[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: Enhancement Request: Custom regex filters in TortoiseMerge

From: Eric Hirst <Eric.Hirst_at_noetix.com>
Date: Thu, 7 Apr 2011 09:11:16 -0700

Thanks Stefan -- I voted on the code comments feature request.

In practice, I haven't seen much need to exclude code comments. They are easy enough to review manually. But I have seen a lot of cases (refactoring especially) where I've had to turn whitespace and line feed settings on and off during comparison sessions. If custom filters were available, I'd be adding and removing those a lot as well. So I'd lobby for some sort of unified interface for whitespace options, code comments, and custom ignore filters.

If multi-line regex filters for /* */ comments can be made to work, there might be nice opportunities to write other custom multi-line filters to cover common refactoring scenarios. For example, breaking up a long C# argument list into multiple lines. I don't know if anyone has come up with a good solution for this in other tools or not. There are some subtleties here -- reviewers might want to see all changes but also have automated cues to indicate what's cosmetic and what isn't.

User interface could be a simple text editor window (disable/enable filters by commenting/uncommenting lines of text), or something fancier with checkboxes, etc. A full implementation would also support customized defaults based on both file type (to cover the code comment use case) and file location ("I want to filter out tool-generated datetime patterns from XML files in directory \foo...")


-----Original Message-----
From: Stefan Küng [mailto:tortoisesvn_at_gmail.com]
Sent: Saturday, April 02, 2011 1:16 AM
To: users_at_tortoisesvn.tigris.org
Subject: Re: Enhancement Request: Custom regex filters in TortoiseMerge

On 01.04.2011 02:44, Eric Hirst wrote:
> Hi,
> We do a lot of automated integration testing using large baseline text files. Occasionally a code change will require a single simple change to be applied to hundreds or even thousands of lines in multiple baseline files. We would like to make the review and check-in process for these baseline files more streamlined and less susceptible to "needle-in haystack" errors where we miss a glaring error among many lines of expected changes.
> I'm imagining a feature which would support a workflow similar to the following:
> 1. Open 1-2 Commit dialogs. Your "session" has started.
> 2. Double-click on an item in the dialogs to start diffing and marking off items for check-in.
> 3. In TortoiseMerge, notice that there are thousands of similar changes in the files being compared.
> 4. In TortoiseMerge, expand a _NEW_ regular expression "ignore" window. By default, it might be blank or it might have regular expressions in place corresponding to your current whitespace-ignore preferences. (It might also have regular expressions to match code comments, if an "ignore comments" option were present.)
> 5. Add a regular expression to the ignore window and refresh. Suddenly you're down to a few hundred changes. Maybe the regex-filtered stuff is still apparent in the GUI, but easily skipped over.
> 6. Iterate until you are happy, then close* TortoiseMerge.
> 7. Continue working through the other files in your session, adjusting and tuning your regex filter set as you go.
> 8. Check in your work to complete your session.
> *Being careful not to hit Esc twice... Doh!
> That's the basic idea. There's some latitude. The other big use case I see for it is in code refactoring. I would be curious to know if it would be of value to others. I also have a number of thoughts about ways to persist and share regex filter libraries across users, checking default filter sets as text or XML files into SVN folders, for example.

See here:


   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2011-04-07 18:11:26 CEST

This is an archived mail posted to the TortoiseSVN Users mailing list.