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

Re: 2-params diff (was: Re: FreeBSD project and subversion.)

From: Les Mikesell <lesmikesell_at_gmail.com>
Date: Wed, 6 Feb 2013 07:54:33 -0600

On Wed, Feb 6, 2013 at 6:23 AM, Stefan Sperling <stsp_at_elego.de> wrote:
> On Wed, Feb 06, 2013 at 12:41:05PM +0100, Branko Čibej wrote:
>> One other option would be, as was noted elsewhere in this thread, to
>> invent a new subcommand for tree comparisons, keeping only the
>> historical differences feature in "svn diff".
>>
>> That would solve the ambiguity, but it would (a) break backward
>> compatibility, and (b) invent yet another subcommand, which we don't like.
>
> I don't think we need to change how 'svn diff' works. A new subcommand
> could simply provide nicer syntax than 'svn diff' for some use cases.
> We can keep 'svn diff' working as it is.
>
> I don't think we should ever change how 'svn diff URL1 URL2' and
> 'svn diff WC-PATH1 WC-PATH2' work.
>
> But a new subcommand could behave differently in the 'WC-PATH1 WC-PATH2'
> case, and compare WC-PATH1 to WC-PATH2. It would essentially be an
> alias for 'diff --old --new'. It may need to overlap a lot with 'svn diff',
> for options such as --summarize perhaps, and all the little options that
> control little aspects of the diff (--ignore-properties,
> --show-copies-as-adds, etc). Would it be worth adding? Not sure.
>
>> Yet another option would be to introduce a new option, so instead of using
>>
>> svn diff --old A --new B
>>
>> you'd get
>>
>> svn diff --compare A B
>>
>> to generate a diff between the two targets, and plain
>>
>> svn diff A B
>>
>> to get the historical diff of each target.
>
> I don't think adding a new option to 'svn diff' would help at all.
> The point is to unclutter the user interface by providing a more
> straightforward way of comparing two paths/URLs with each other.
> Another option (especially one that overlaps with functionality provided by
> existing --old and --new options) would make the UI even more complicated
> than it already is.

From a naive user's point of view, if you call it 'diff' you should
expect it to take two arguments and give you the difference like the
well known thing called diff. If it doesn't do that, why call it diff
 and if it doesn't do that in the case of one of those arguments
being a working copy target and the other a URL it should tell you the
right syntax for that operation instead of pretending it can't do it.
  And if working copy references are sometimes magically/silently
converted to HEAD when used as the target of --old or --new (and
that's desirable for some reason I don't understand...) maybe you need
something like @WC to show that when you reference the working copy
path you really mean the working copy instance.

-- 
   Les Mikesell
     lesmikesell_at_gmail.com
Received on 2013-02-06 14:55:11 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.