Comments (17)
ExamDiff apparently has this feature implemented as a regex function so you can
define yourself comments for each programming language.
Original comment by tortoisesvn
on 17 Mar 2010 at 9:26
from tortoisesvn.
Original comment by [email protected]
on 18 Mar 2010 at 6:53
- Changed state: Accepted
from tortoisesvn.
Or something like a SED in front of the diffing engine, i.e. have a stream
editor like thingy alter the data before it's used in TMerge.
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=29480
96
Original comment by tortoisesvn
on 14 Apr 2012 at 8:22
from tortoisesvn.
/*
this is my project
*/
Original comment by virajhegshetye1
on 22 Jan 2013 at 10:19
from tortoisesvn.
Noticed that Viraj has claimed this; thanks. This one's still on my wish list,
mainly as the "SED in front of the diffing engine" option (Apr 14 2012 comment
and link) We do a lot of that stuff as manual pre-process steps to help
compare large integration test baselines. Our two most common pre-process use
cases are:
1. Single line sed replacements to filter out things like GUIDs and timestamps
2. Full-file sorts to help distinguish sort order changes from other changes
Including use case #2 suggests making the pre-processor tool configurable, but
that could be scope creep. Just implementing #1 and someday adding a check-box
to support #2 might yield be a better overall experience.
The hardest design questions here, in my mind, revolves around how custom
filters are shared among users in an organization. Right now our pre-processor
scripts are largely a scattered collection of batch files, some checked into
SVN (not necessarily known to anyone outside Team XYZ), others living on
individual workstations, etc. One possible solution to this is problem would be
to support a new folder-level property, e.g. "tortoisemerge:customfilters"
that pointed to a text (xml?) file (files?) that defines custom filters
automatically available to anyone diffing a file in that folder or its
subfolders.
Original comment by [email protected]
on 22 Jan 2013 at 7:18
from tortoisesvn.
this should not be implemented using external tools. Because let's face it: if
you need them, you don't have them installed.
This should be done using regular expressions ( e.g., with regex_replace() ) to
modify the files before they're fed to the diffing engine.
Original comment by tortoisesvn
on 23 Jan 2013 at 7:01
from tortoisesvn.
For the primary use case, I completely agree:
1. choose a well-known, well-documented, regex syntax, support that, and
2. do it in a way that makes it easy for the guy down the hall to use the same
quiver of regex filters that I use.
"Support for external filtering tools" is really an independent feature request
(wrong forum I know; my apologies), but I mention it here since any future
implementation of it would fit closely side-by-side with the current regex
stuff.
By this, I mean support for pluggable external filters, not any actual new
dependency on such filters. For example, I just did a code review this morning
of a freshly forked C# library where virtually all the changes were StyleCop
driven formatting tweaks. I (think I) could build a filtering tool using the
Microsoft.CSharp namespace to convert a given C# file into a more canonical
form to reduce a lot of this noise in a comparison. Such a tool would probably
work best with both input files as arguments, so one file could be treated as a
reference source when resolving details like method re-names.
Thanks, Eric
Original comment by [email protected]
on 23 Jan 2013 at 8:55
from tortoisesvn.
I guess using a regex won't work with the current implementation since the
whole file handling in TMerge is line based. And such regexes would need to
work on multiple lines.
At least for now, I'll implement this using a simpler approach:
define line and block comments using tokens, for example for a c/c++ file that
would be:
line comment start: //
block comment start: /*
block comment end: */
this would also be much simpler to use for those who don't understand regular
expressions.
Original comment by tortoisesvn
on 30 Oct 2013 at 2:45
- Changed state: Started
- Added labels: Milestone-1.9.0
from tortoisesvn.
I think just supporting single-line regex replacements would go a long way.
I'm looking at the code (I think this is the right place):
bool CDiffData::CompareWithIgnoreWS(CString s1, CString s2, DWORD dwIgnoreWS)
and imagining passing strings s1 and s2 through arbitrary user-definable regex
filters. For example, the function could get a collection of string pairs that
could be passed into boost::regex_replace. For example, see
http://stackoverflow.com/questions/13904622/replace-string-through-regex-using-b
oost-c and imagine passing in the string pair:
{"\\|[^-\\d.]*(-?[\\d.]*)\\}\\}", "$1"}
Tortoise could offer several pre-seeded string pairs, to handle single line
comments, replacing GUIDs with the string "GUID", a common date-time format
with the string "DATE TIME", etc. The initial implementation would err on the
side of a very short list of pre-seeded values. TortoiseMerge users would
suggest future additions.
Original comment by [email protected]
on 30 Oct 2013 at 4:41
from tortoisesvn.
I'll get to that in a second step. But not using boost - the c-runtime now has
its own regex engine.
Original comment by tortoisesvn
on 30 Oct 2013 at 6:46
from tortoisesvn.
Nice, thanks. All kinds of "show only the important differences" use cases out
there.
Original comment by [email protected]
on 30 Oct 2013 at 7:03
from tortoisesvn.
Original comment by tortoisesvn
on 30 Oct 2013 at 8:13
from tortoisesvn.
This issue was updated by revision r24915.
Feature done, but UI is still missing.
Original comment by tortoisesvn
on 30 Oct 2013 at 8:14
from tortoisesvn.
This issue was updated by revision r24919.
Original comment by tortoisesvn
on 31 Oct 2013 at 2:41
from tortoisesvn.
This issue was closed by revision r24932.
Original comment by tortoisesvn
on 6 Nov 2013 at 9:44
- Changed state: Fixed
from tortoisesvn.
Just downloaded version 1.8.8. Still no sign of an according UI option.
According to https://code.google.com/p/tortoisesvn/source/detail?r=24919 it
should be there?!
Original comment by [email protected]
on 14 Oct 2014 at 7:42
from tortoisesvn.
Look at the milestone: 1.9.0
New features are never added to the stable branch.
Original comment by [email protected]
on 14 Oct 2014 at 11:11
from tortoisesvn.
Related Issues (20)
- filtering out regular expressions crashes HOT 5
- illegal temp file name when diffing from server root HOT 2
- bug-id field not set correctly for a restarted commit HOT 2
- file diff dialog sorts case-sensitive HOT 2
- Escape must not close dialog if an autocompletion is in progress HOT 2
- svn: E120106: ra_serf: The server sent a truncated HTTP response body. HOT 1
- "Get Lock" on file external shows empty dialog HOT 2
- Settings: Page title and selection in index not updated when using PageUp/PageDown HOT 2
- Allow searching backwards in TBlame HOT 2
- Statistics graph for "Commits by author" error when "Authors case sensitive" is toggled HOT 3
- Crash in webshld.dll
- Implement a Redo function in TortoiseMerge HOT 4
- Memory leak showing status HOT 2
- Show all inherited props HOT 3
- Set the state of the "save authentication" checkbox HOT 3
- crash in crypttrust.dll
- Cleanup + Update HOT 1
- assertion failed (action == svn_wc_conflict_action_delete) with Github HOT 2
- Patch for /ReadMe.html HOT 2
- Issue while creating a build using nant HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tortoisesvn.