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 23:30:05 GMT
On Wed, Feb 6, 2013 at 12:07 AM, Stefan Sperling <stsp@apache.org> wrote:
> On Tue, Feb 05, 2013 at 09:18:33PM +0100, Johan Corveleyn wrote:
>> 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.
>
> Well, the point that convinced me was that previously 'svn diff' raised
> an error in the case of 'svn diff ^/left.txt right.txt'.
> That's clearly intended to be a comparison between a URL and a path,
> which the diff code already supports. So I think the diff code should
> just show an appropriate diff. I don't see how people could be conflating
> a URL->WC or WC->URL diff with a WC->WC diff.
>
> BTW, I'm thinking about adding more shortcuts:
>
>   svn diff UNVERSIONED-PATH WCPATH
>   svn diff WCPATH UNVERSIONED-PATH
>   svn diff UNVERSIONED-PATH1 UNVERSIONED-PATH2
>
> All of which are supported by 'svn diff --old=X --new=Y' (in 1.8-to-be,
> not in 1.7), but not by plain 'svn diff'.
>
> The --old --new syntax is specific to Subversion. Many users who are
> accustomed to "standard" diff commands will not try using --old and --new
> (unless they've taken the time to read 'svn help diff', of course, which
> apparently is too much time to ask from some users ;)
>
> That said, if you'd rather just print the error message instead, that's
> fine with me, too. I don't care strongly enough about this to the point
> where I'd say that we _must_ make this change to 'svn diff'. It's been
> committed, but that doesn't mean that this has to be in 1.8.0 at all costs.

Nah, it's fine, I think I'm starting to get convinced ;-). But it's
still a pity that there is no relief (at least I don't see any) for
confusion around the fact that 'svn diff WC-PATH1 WC-PATH2' doesn't
diff WC-PATH1 and WC-PATH2 against each other.

The shorthands with the unversioned paths are quite nice I think, but
there is an additional risk of confusion: 'svn diff UNVERSIONED-PATH1
UNVERSIONED-PATH2' will mean something totally different than 'svn
diff WC-PATH1 WC-PATH2' (even though they could both refer to the same
local files, but the commands are separated by an invocation of 'svn
add').

>> Speaking of the error message:
>
>> 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?
>
> The error message is triggered by an invocation like:
>
>  svn diff -c42 foo ^/trunk bar
>
> Which is clearly invalid usage according to 'svn help diff'.

Yes, but in this case the user gives 3 targets, so he clearly couldn't
have meant one of the shorthand syntaxes, right?

-- 
Johan

Mime
View raw message