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

Re: finishing `svn diff': two ways to do it

From: Branko Čibej <brane_at_xbc.nu>
Date: 2001-10-11 23:35:34 CEST

kfogel@collab.net wrote:

>Kevin Pilch-Bisson <kevin@pilch-bisson.net> writes:
>>There is another slight hurdle though. The option parsing code in main.c
>>currently won't support the same option twice, so -r 4 -r 9 won't work with=
>>at least a little re-write. I know our code won't handle it, I'm not sure
>>the APR functions used for options.
>We can either rewrite it, or allow colon-separated values, i.e.,
> $ svn diff -r 7 /* diff from working to 7 */
> $ svn diff -r :7 /* diff from working to 7 */
> $ svn diff -r 7: /* diff from 7 to working */
> $ svn diff -r BASE:7 /* diff from base to 7 */
> $ svn diff -r 3:7 /* diff from 3 to 7 */
> $ svn diff -r 7:3 /* diff from 7 to 3 */
>Formally, when the colon is omitted, it is assumed to be on the left
>of the revision, and when a revision is omitted, it is assumed to be
>"WORKING". As a special case, when no -r option is given, diff from
>base to working.
+1, Except for the switching the default when the colon is ommitted
(i.e., it should be assumed to be on the right of the revision).

I find this cleaner than having two -r options:

svn -r 317 diff foo -r 713. :-( horrible
svn -r 317:713 diff foo :-| not nice, but acceptable
svn diff -r 317:713 foo :-) nicest
svn diff foo -r 317:713 :-) almost nicest

Brane �ibej   <brane_at_xbc.nu>            http://www.xbc.nu/brane/
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:44 2006

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.