You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Malcolm Rowe <ma...@farside.org.uk> on 2005/10/27 08:53:14 UTC

New -c option to diff/merge (r17054)

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

Regards,
Malcolm

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

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

Posted by "C. Michael Pilato" <cm...@collab.net>.
Daniel Rall <dl...@collab.net> writes:

> +1.  I also prefer David's --reverse suggestion to the negative
> revnum option.

Yah.  -1 on an option value syntax (such as '-c -2') that reads like
an option itself.

-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

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

Posted by Daniel Rall <dl...@collab.net>.
On Thu, 27 Oct 2005, Daniel Berlin wrote:

> On Thu, 2005-10-27 at 13:30 +0100, Malcolm Rowe wrote:
> > On Thu, Oct 27, 2005 at 08:19:43AM -0400, Daniel Berlin wrote:
> > > > Looks like the parsing for the new --change option should probably trap
> > > > negative revision numbers in the same way as it traps revision 0:
> > > > 
> > > Hmmmmmmmmmmm.
> > > Well, since it's there, should I implement Karl's suggestion of making
> > > it transform -2 into 2:1?
> > > 
> > 
> > Unsure; we can always add it in as an option later.
> > 
> > I think that it might need further discussion, especially in light of
> > Julian's proposal to extend -c to log, etc. (What would 'svn log -c
> > -2' mean, for example?).
> > 
> 
> Okay, i will prepare a patch to disallow it for now.

+1.  I also prefer David's --reverse suggestion to the negative revnum option.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

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

Posted by Daniel Berlin <db...@dberlin.org>.
On Thu, 2005-10-27 at 13:30 +0100, Malcolm Rowe wrote:
> On Thu, Oct 27, 2005 at 08:19:43AM -0400, Daniel Berlin wrote:
> > > Looks like the parsing for the new --change option should probably trap
> > > negative revision numbers in the same way as it traps revision 0:
> > > 
> > Hmmmmmmmmmmm.
> > Well, since it's there, should I implement Karl's suggestion of making
> > it transform -2 into 2:1?
> > 
> 
> Unsure; we can always add it in as an option later.
> 
> I think that it might need further discussion, especially in light of
> Julian's proposal to extend -c to log, etc. (What would 'svn log -c
> -2' mean, for example?).
> 

Okay, i will prepare a patch to disallow it for now.



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

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

Posted by Malcolm Rowe <ma...@farside.org.uk>.
On Thu, Oct 27, 2005 at 08:19:43AM -0400, Daniel Berlin wrote:
> > Looks like the parsing for the new --change option should probably trap
> > negative revision numbers in the same way as it traps revision 0:
> > 
> Hmmmmmmmmmmm.
> Well, since it's there, should I implement Karl's suggestion of making
> it transform -2 into 2:1?
> 

Unsure; we can always add it in as an option later.

I think that it might need further discussion, especially in light of
Julian's proposal to extend -c to log, etc. (What would 'svn log -c
-2' mean, for example?).

Regards,
Malcolm

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

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

Posted by David James <ja...@gmail.com>.
On 10/27/05, Daniel Berlin <db...@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

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

Posted by Daniel Berlin <db...@dberlin.org>.
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?




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org