You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Brad Wellman <b-...@hotmail.com> on 2013/03/04 22:45:34 UTC

Request for feature svn diff --exclude-revisions

Hi,
Does anyone know if there is anything mentioned in bug lists etc. about being able to exclude certain revisions from an svn diff?
I am using svn diff -r 10838:HEAD myBranch but within that branch I have removed an old module and put in the new version of it.So say I removed the module in 10861 and added the new version in 10862.
It would be awesome to be able to do something like: svn diff -r 10838:HEAD --exclude-revisions 10861:10862 myBranch to get only the changes that I have done on files without having to ignore/skip module updated files etc.
I have seen a bug request asking to be able to exclude certain directories and this is a very similar request.

RegardsBrad 		 	   		  

Re: Request for feature svn diff --exclude-revisions

Posted by Stefan Sperling <st...@elego.de>.
On Tue, Mar 05, 2013 at 02:04:53PM +0200, Daniel Shahaf wrote:
> I think you can already do what you want with the svn diff --old --new'
> syntax (see 'svn help diff'), potentially with --ignore-ancestry too.

The diff --old -new syntax allows for limiting the diff to one or more
children of the diff targets. But it doesn't allow for excluding
children, except by enumerating all desired children.

For now, I would suggest using some 3rd party diff post-processing
tool to filter unwanted child paths from the output. One such tool is
filterdiff from patchutils, see http://cyberelk.net/tim/software/patchutils/ 

I would not mind seeing this functionality in Subversion but I don't
think it is very important. Why do you really need it?

I don't see how excluding subranges from the revision range being diffed
could be useful, or even well defined in the general case.
I suspect Brad came up with this idea because he already knows that the
unwanted revision range only affects a particular path within the diff
target. To me, it seems more natural to be filtering by path in this case,
rather than by revision numbers.

Also, depending on what kind of information you really want to obtain
by looking at the diff output, it is possible that using 'svn log --diff'
(new in Subversion 1.7) instead of 'svn diff' would be more useful than
any of the above.

Re: Request for feature svn diff --exclude-revisions

Posted by Daniel Shahaf <da...@apache.org>.
I think you can already do what you want with the svn diff --old --new'
syntax (see 'svn help diff'), potentially with --ignore-ancestry too.

Brad Wellman wrote on Tue, Mar 05, 2013 at 08:45:34 +1100:
> 
> Hi,
> Does anyone know if there is anything mentioned in bug lists etc. about being able to exclude certain revisions from an svn diff?
> I am using svn diff -r 10838:HEAD myBranch but within that branch I have removed an old module and put in the new version of it.So say I removed the module in 10861 and added the new version in 10862.
> It would be awesome to be able to do something like: svn diff -r 10838:HEAD --exclude-revisions 10861:10862 myBranch to get only the changes that I have done on files without having to ignore/skip module updated files etc.
> I have seen a bug request asking to be able to exclude certain directories and this is a very similar request.
> 
> RegardsBrad