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

Re: svn diff - Is this behaviour expected?

From: Stefan Sperling <stsp_at_elego.de>
Date: Sun, 15 Aug 2010 22:10:04 +0200

On Sat, Aug 14, 2010 at 04:05:17AM +0100, chris0_at_lavabit.com wrote:
> Hello,
>
> I'm running 'svn diff ...' from my application.
> I want to make it work with filenames that contain '@'.
> However, I'm finding, what appear to be, inconsistencies in its
> behaviour.
>
> For testing I have a working copy with 2 files 'example.txt' &
> 'EX_at_MPLE.TXT'. Both contain plain ASCII, are updated to HEAD & each
> have > 3 committed revisions.
> If I run the following script I see output as indicated alongside
> the commands.
>
> ---------->8---------->8---------->8----------
> #!/bin/sh
>
> F="${1:-EX_at_MPLE.TXT}"
> echo 'XXXX' >> "$F"
>
> echo "WITH NO -r:" # Output:
> svn diff "$F" # <DIFF>
> svn diff "$F"@ # ERROR: '<name>@' is not under
> version control
> svn diff "$F"@HEAD # ERROR: '<name>@HEAD' is not under
> version control
> svn diff "$F"@BASE # ERROR: '<name>@BASE' is not under
> version control
>
> echo ""; echo "WITH -rHEAD:" # v--- iff $1 contains '@'
> svn diff -rHEAD "$F" # <DIFF> or ERROR: Syntax error
> parsing revision 'MPLE.TXT'
> svn diff -rHEAD "$F"@ # <DIFF>
> svn diff -rHEAD "$F"@HEAD # <DIFF>
> svn diff -rHEAD "$F"@BASE # <DIFF>
>
> echo ""; echo "WITH -rBASE:"
> svn diff -rBASE "$F" # <DIFF>
> svn diff -rBASE "$F"@ # ERROR: '<name>@' is not under
> version control
> svn diff -rBASE "$F"@HEAD # ERROR: '<name>@HEAD' is not under
> version control
> svn diff -rBASE "$F"@BASE # ERROR: '<name>@BASE' is not under
> version control
>
> echo ""; echo "WITH -rPREV:" # v--- iff $1 contains '@'
> svn diff -rPREV "$F" # <DIFF> or ERROR: Syntax error
> parsing revision 'MPLE.TXT'
> svn diff -rPREV "$F"@ # <DIFF>
> svn diff -rPREV "$F"@HEAD # <DIFF>
> svn diff -rPREV "$F"@BASE # <DIFF>
>
> svn revert "$F"@
> ---------->8---------->8---------->8----------
>
> Is this expected/desired? Should I create a new issue? (I couldn't
> find anything similar.)

These were similar:
http://subversion.tigris.org/issues/show_bug.cgi?id=3416
http://subversion.tigris.org/issues/show_bug.cgi?id=3651

Peg revision parsing is inconsistent in many subcommands.
We've done some work on it, but it needs to be cleaned up in a few more
places still. Please file a new issue. Thanks.

> Is there a consistent (backwards & forwards compatible) syntax I can
> use?

No, unfortunately you cannot. These bugs prevent people from using a
consistent syntax in scripts, which is why it's great that you reported
this so we can fix it.

Stefan
Received on 2010-08-15 22:10:44 CEST

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