subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johan Corveleyn <jcor...@gmail.com>
Subject Re: FreeBSD project and subversion.
Date Tue, 05 Feb 2013 20:18:33 GMT
On Tue, Feb 5, 2013 at 5:08 PM, Stefan Sperling <stsp@elego.de> wrote:
> On Tue, Feb 05, 2013 at 12:59:43PM +0100, Johan Corveleyn wrote:
>> Given what I said above, this can't be done in general (not if you
>> give two URLs or two wc paths, because then both synopsis 1 and 2 are
>> possible -- it would obviously break backwards compatibility if we
>> would now start erroring out on these, while these used to work fine
>> with automatically picking usage 1 before). Only if one of them is a
>> URL and the other a WC path, because we give an error message then
>> anyway.
>
> I think Alexey meant only the cases where we currently error out, i.e. where
> exactly two targets are given and one is a path and the other is a URL.
>
> I didn't realise this but there is indeed no ambiguity in allowing this
> syntax as a shorthand for a corresponding '--old X --new Y' diff invocation.
>
> Thanks Alexey, see http://svn.apache.org/r1442640
> Making these invocations produce a diff instead of an error makes things
> less surprising for users.

Hmm, okay, but I would have preferred some more discussion before you
implemented this. It's not clear to me that this decreases the
surprises. I can perfectly imagine just as many questions being asked
on users@ with the question: "Why does 'svn diff left.txt right.txt'
give me an empty diff, while 'svn diff ^/left.txt right.txt' does the
right thing?"

I think it would be better to consistently point users to the
--old/--new syntax, so as to educate users more (so I'm okay with the
change in the error message), not hide it even more from them.

Speaking of the error message:

On Tue, Feb 5, 2013 at 5:24 PM, Stefan Sperling <stsp@elego.de> wrote:
> On Mon, Feb 04, 2013 at 04:39:32PM -0800, Alexey Neyman wrote:
>> What adds oil to the fire is that the error message, which claims that "Target
>> lists to diff may not contain both working copy paths and URL". If instead it
>> said that the supplied syntax is ambiguous and suggested to use --new/--old
>> for disambiguation, this would have saved a lot of frustration and would
>> eliminate the need of "svn compare" subcommand :)
>>
>> For example:
>> svn: Ambiguous target list (contains both work copy paths and URLs). Use
>> --old/--new syntax to disambiguate.
>
> Agreed. The error message wasn't very helpful.
> I've improved it in http://svn.apache.org/r1442645 based on your suggestion.
> Thanks!

How is this useful after r1442640? Seems to me we should either
improve the error message (which would be my preferred option) *or*
make 'svn diff' handle these automatically as a shorthand syntax
(hence no error message). But not both.

Or am I missing something?

-- 
Johan

Mime
View raw message