Giter Club home page Giter Club logo

Comments (17)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 26, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 26, 2024

Original comment by [email protected] on 18 Mar 2010 at 6:53

  • Changed state: Accepted

from tortoisesvn.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 26, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 26, 2024
/*
this is my project
*/

Original comment by virajhegshetye1 on 22 Jan 2013 at 10:19

from tortoisesvn.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 26, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 26, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 26, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 26, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 26, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 26, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 26, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 26, 2024

Original comment by tortoisesvn on 30 Oct 2013 at 8:13

from tortoisesvn.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 26, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 26, 2024
This issue was updated by revision r24919.

Original comment by tortoisesvn on 31 Oct 2013 at 2:41

from tortoisesvn.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 26, 2024
This issue was closed by revision r24932.

Original comment by tortoisesvn on 6 Nov 2013 at 9:44

  • Changed state: Fixed

from tortoisesvn.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 26, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 26, 2024
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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.