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

Re: New diff syntax? (see issue #1142)

From: Robert Pluim <rpluim_at_bigfoot.com>
Date: 2003-05-16 00:11:03 CEST

kfogel@collab.net writes:

[snip description of current syntax]

> To solve this problem, I think we need to change the 'svn diff'
> syntax. Mike Pilato proposed there be two ways to invoke it:
>
> $ svn diff [-rN] [ARG]
>
> Diffs working file ARG against its text-base, or if -r is given,
> diffs against revision N instead of the base revision. If no ARG
> is given, then diff behaves as it does currently when invoked on
> `.' .

Why only one revision? Sometimes I want to see what changed between
two revisions, neither of which is my base, and I expect to be able to
type eg

$ svn diff -r3:4 README

> and
>
> $ svn diff [-rN[:M]] ARG1 ARG2
>
> always diffs ARG1 against ARG2, no matter what combination of local
> files or URLs they are. N and M apply to ARG1 and ARG2 respectively;
> you can always omit one or use the `WORKING' keyword if necessary.
>

Oh, OK, so I could type

$ svn diff -r3:4 README README

but that seems excessive :-)

> So 'svn diff' would now take either one argument, or two, no more than
> that. If you want to get diffs for a specific list of files, you just
> invoke 'svn diff' on each file individually. Which is fine: as Mike
> points out, 'patch' handles concatenated diff output transparently.
> Bonus: the output of 'svn help diff' becomes a lot easier to
> understand. (Whether we keep the "file@REV" syntax is a separate
> question, and I'd like to keep that bikeshed out of this thread).
>

:-) OK. I have definite opinions on that one, which we can talk about
some other time.

> We're both +1 on this new syntax, but want some feedback. Personally,
> I always run 'svn diff' either on one file, or with no arguments at
> all. I never run it on, say, three files :-). I probably *would* run
> it to compare against URLs if I could...
>
> But hey, anecdotal evidence is just anecdotal evidence.
>
> How do people feel about this change?

+1, the current svn diff syntax is too confusing, and this one is much
better.

Robert

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri May 16 00:25:32 2003

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.