You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Till Maas <co...@till.name> on 2011/06/22 11:09:55 UTC
add svn diff -c PREV
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
Re: add svn diff -c PREV
Posted by Till Maas <op...@till.name>.
On Wed, Jun 22, 2011 at 11:55:06AM +0100, Julian Foad wrote:
> Till, do you want to see the most recent commit, a behaviour which could
> be expressed as "-r PREV:COMMITTED"? If so, the syntax we would choose
> if we do implement this would probably be "-c COMMITTED". "-c PREV"
> which would mean "show what was changed in the commit before the most
> recent one", and I don't think that's what you want.
Yes, "-c COMMITTED" seems to be what I am missing.
Regards
Till
Re: add svn diff -c PREV
Posted by Julian Foad <ju...@wandisco.com>.
On Wed, 2011-06-22 at 12:01 +0200, Stefan Sperling wrote:
> 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.
Till, do you want to see the most recent commit, a behaviour which could
be expressed as "-r PREV:COMMITTED"? If so, the syntax we would choose
if we do implement this would probably be "-c COMMITTED". "-c PREV"
which would mean "show what was changed in the commit before the most
recent one", and I don't think that's what you want.
- Julian
> > 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)
Re: add svn diff -c PREV
Posted by Stefan Sperling <st...@elego.de>.
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)
Re: add svn diff -c PREV
Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Not a trivial fix, unfortunately.
See http://subversion.tigris.org/issues/show_bug.cgi?id=2691
(and I remember another issue with a patch for 'diff -c HEAD', but can't
find it ATM.)
Till Maas wrote on Wed, Jun 22, 2011 at 11:09:55 +0200:
> 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