Ben Collins-Sussman wrote:
>
> I've heard both kfogel and ghudson say that they think 'diff' and
> 'merge' should behave consistently, but I think this is a potentially
> dangerous goal.
>
> The diff command has three distinct abilities:
>
> * compare working to text-base
> * compare working to repository
> * compare repository to repository.
That's not an accurate categorisation of "svn diff"'s abilities. For example,
it can also compare text-base to repository ("diff -rBASE:23 WC-PATH") and
working to working ("diff --old=WC1 --new=WC2"). The abilities could be
categorised as:
* For each specified versioned item, show the difference between how it was
at revision X and how it was at revision Y.
* Show the difference between (optionally specified pathnames within) two
separate trees.
> Of these three use-cases, *only* the third one is similar to 'svn merge'.
Indeed, but that's really only because it happens not to support a way to
specify the working copy as a pseudo-revision. There's no semantic reason why
it shouldn't, as far as I'm aware.
Of my two categories, both are similar to "svn merge". (One obvious difference
is that "merge" only operates on one item rather than an arbitrary list.)
> We've gone through hell trying to come up with an understandable 'svn
> diff' syntax that covers the three use-cases. I'm wary of starting to
> tweak 'svn diff' syntax just so that the 3rd use-case behaves in
> special ways that make it behave more like 'svn merge'. 'svn diff'
> syntax already complex, bordering on confusing.
I hear you. It's good to be wary.
> I guess I'm not entirely clear on what's being proposed, though. It
> sounds like people are asking for 'svn merge [some new syntax of X]
> URL' to mean "merge revision X-1:X of URL".
Correct.
> I'm afraid that if we
> introduce the new syntax to 'svn diff', it will have to somehow be
> restricted to *only* the affect 3rd use-case, and done in such a way so
> as not to interfere with the other two use-cases. Is this really
> possible?
I'd imagine it is not only possible but inevitable. If the user specified
something meaning "-r(X-1):X" then he can't possibly be requesting a WC diff,
so where's the problem?
- Julian
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Aug 5 18:46:23 2005