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

Re: FreeBSD project and subversion.

From: Stefan Sperling <stsp_at_apache.org>
Date: Wed, 6 Feb 2013 00:07:59 +0100

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.

> 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'.
Received on 2013-02-06 00:08:45 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.