You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Rory McCann <ro...@netsoc.ucd.ie> on 2007/02/28 11:20:09 UTC

diff -r BASE:HEAD and switched subdirectories?

I'm having trouble with svn diff on directories that I've 'switch'ed.

In the repository, I have 2 directories, a and c.

$ svn list -R file:///path/to/repo
a/
a/c/
c/
c/file1
c/file2


In my working copy I have 'a' checked out and have switched 'a/c' to be
c, so it looks like this:

$ find a ! -path '*.svn*'
a
a/c
a/c/file2
a/c/file1

This is because I need the files in c to be shared amoung a few
different directories.

I can update and commit fine and it'll go through the various
subdirectories and commit to the right place, eg:
$ svn update
At revision 9.
$ svn diff
$

But when I try to see what would be changed (remember this has just been
updated, so there should be nothing changed)

$ svn diff -rBASE:HEAD
Index: c/file1
===================================================================
--- c/file1     (revision 9)
+++ c/file1     (working copy)
@@ -1 +0,0 @@
-test c/file1
Index: c/file2
===================================================================
--- c/file2     (revision 9)
+++ c/file2     (working copy)
@@ -1 +0,0 @@
-this is file 2

However normal svn diff works fine:

$ cat >> c/file2
A new line on the end of file2
$ svn diff
Index: c/file2
===================================================================
--- c/file2     (revision 9)
+++ c/file2     (working copy)
@@ -1 +1,2 @@
 this is file 2
+A new line on the end of file2

It looks as if when you svn diff with a switched directory, it doesn't
'follow' the switch. If there actually are updates, they don't appear.
If you cd to the directory and run the command it works correctly, but
this is a bit of a pain.

Is there anyway to 'fix' this?


Thanks,

Rory


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: diff -r BASE:HEAD and switched subdirectories?

Posted by Bob Hiestand <bo...@gmail.com>.
On 2/28/07, Rory McCann <ro...@netsoc.ucd.ie> wrote:

> I'm having trouble with svn diff on directories that I've 'switch'ed.

[...]

> $ svn diff -rBASE:HEAD
> Index: c/file1
> ===================================================================
> --- c/file1     (revision 9)
> +++ c/file1     (working copy)
> @@ -1 +0,0 @@
> -test c/file1
> Index: c/file2
> ===================================================================
> --- c/file2     (revision 9)
> +++ c/file2     (working copy)
> @@ -1 +0,0 @@
> -this is file 2

Rory,

I see the same behavior.  Can you solve your problem with externals?

Thank you,

bob

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org