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

svn diff - Is this behaviour expected?

From: <chris0_at_lavabit.com>
Date: Sat, 14 Aug 2010 04:05:17 +0100

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.)
Is there a consistent (backwards & forwards compatible) syntax I can
use?
Am I missing something (other than sufficient sleep)?

I'm using "svn, version 1.6.12 (r955767)" on Mac OS X.
[Svn 1.6.6 also produces identical results.
  Svn 1.4.6 is basically the same, but the final revert is 'Skipped'.]

Regards,

Chris
Received on 2010-08-14 18:44:44 CEST

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

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