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

Re: New -c option to diff/merge (r17054)

From: David James <james82_at_gmail.com>
Date: 2005-10-27 14:38:26 CEST

On 10/27/05, Daniel Berlin <dberlin@dberlin.org> wrote:
> On Thu, 2005-10-27 at 09:53 +0100, Malcolm Rowe wrote:
> > Hi Dan,
> >
> > Looks like the parsing for the new --change option should probably trap
> > negative revision numbers in the same way as it traps revision 0:
> >
> > $ svn diff -c 0 http://svn.collab.net/repos/svn
> > ../svn-trunk/subversion/clients/cmdline/main.c:942: (apr_err=205000)
> > svn: There is no change 0
> >
> > vs
> >
> > $ svn diff -c -1 http://svn.collab.net/repos/svn
> > ../svn-trunk/subversion/libsvn_client/ra.c:821: (apr_err=195012)
> > svn: Unable to find repository location for 'http://svn.collab.net/repos/svn' in revision -2
>
> Hmmmmmmmmmmm.
> Well, since it's there, should I implement Karl's suggestion of making
> it transform -2 into 2:1?
I'm not a big fan of this idea, because it doesn't play well with
multiple revisions. (The meaning of -c-1,2,3 is unclear.) If we want
to implement reverting revisions, it'd be better to use a flag like
"--reverse".

To me, the advantage of "-c" isn't less typing: it's clarity. If I
read the log message for r45, and I want to merge it, I can do it
using svn merge -c45. When I use the "-r" option, I always have to
doublecheck my work, because I often mix up -r45:46 and -r44:45.

svn merge --reverse -c45,49,57,99,120 is an easy way to revert changes
45,49,57,99, and 120. IMHO, it's better to type that, then to type

svn merge -r121:120
svn merge -r58:57
svn merge -r49:48
svn merge -r46:45

.. and then, after all that work, realise you merged it wrong, because
you typed "svn merge -r x+1:x" instead of "svn merge -r x:x-1"

Cheers,

David

Cheers,

David

When I see svn merge -r4:5

Cheers,

David

--
David James -- http://www.cs.toronto.edu/~james
Received on Thu Oct 27 14:40:38 2005

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.