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

Re: add svn diff -c PREV

From: Stefan Sperling <stsp_at_elego.de>
Date: Wed, 22 Jun 2011 12:01:03 +0200

On Wed, Jun 22, 2011 at 11:09:55AM +0200, Till Maas wrote:
> Hiyas,
>
> as requested in the buddy peer review for feature requests I asked on
> IRC for opinions to implement "svn diff -c PREV". There it was proposed
> to ask here.
>
> I am missing to use "svn diff -c PREV", which should show the previous
> commit without the changes to the current working copy.
>
> Regards
> Till

I see one problem with this approach.
The PREV revision might not be related to the path your working
copy came from. Especially if you have multiple projects sharing
a repository, -c PREV will often result in an empty diff for the
given working copy.
-c COMMITTED would always generate a diff, but PREV is just COMMITTED-1
so it might not always be what you are looking for. You're really
looking for something that shows the most recent *operative* revision
for the working copy older than COMMITTED. But this isn't currently
available as a keyword.

Regardless, note that with a 1.7 svn client you can use this workaround
to run the equivalent of diff -c PREV: svn log -r PREV --diff --limit 1
(see http://subversion.apache.org/docs/release-notes/1.7.html)
Received on 2011-06-22 12:01:39 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.