You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Simon Large <sl...@blazepoint.co.uk> on 2004/08/27 09:54:17 UTC

svn cat broken by folder rename in repository

If I rename a folder in the repository, svn cat seems unable to traverse the
rename to get old revisions. This shows up in TortoiseSVN (where I
originally reported the problem) when I try to do a visual diff, for which
TSVN needs access to both revisions. Using TSVN 1.1.0 RC1, which is built on
SVN 1.1.0 RC2.

Simon.

Content of post to TSVN list, with response:
> Using TSVN 1.1.0 RC1
>
> Create a local repository
> Create a repo directory called 'Fred' (Rev 1).
> Import some files into the repository (Rev 2).
> Edit one of the files (Test.c) and commit (Rev 3).
> In repo browser, rename 'Fred' to 'Bert' (Rev 4).
> In repo browser, show log for Test.c.
> In repo browser, highlight revisions 4 and 2 and try to compare revisions.
> Error message: 'File not found: revision 2, path '/Bert/test.c'.
>
> However, viewing the Unified diff on the same 2 revs works OK.

Seems that an
'svn cat /Bert/test.c -r2'
doesn't really work.


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

Re: svn cat broken by folder rename in repository

Posted by Jim Correia <ji...@pobox.com>.
On Aug 27, 2004, at 11:34 AM, Jim Correia wrote:

> I can reproduce the problem with the command line client when using 
> URLs and files (I think this was previously mentioned in the thread.) 
> I'm not sure if following a file by URL after a rename is intended to 
> work?

Upon further consideration, it would appear that when working with URLs 
and now WC files, it has to be this way (otherwise possibly incorrect 
assumptions would have to be made...)

Jim


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

Re: svn cat broken by folder rename in repository

Posted by Jim Correia <ji...@pobox.com>.
On Aug 27, 2004, at 11:23 AM, Ben Collins-Sussman wrote:

> On Fri, 2004-08-27 at 05:35, Ulrich Eckhardt wrote:
>> Simon Large wrote:
>>> If I rename a folder in the repository, svn cat seems unable to 
>>> traverse
>>> the rename to get old revisions. This shows up in TortoiseSVN (where 
>>> I
>>> originally reported the problem) when I try to do a visual diff, for 
>>> which
>>> TSVN needs access to both revisions.
>>
>> If you rename from 'Foo' to 'Bar' at revision X, revisions < X don't 
>> contain a
>> 'Bar', which is why you can't 'svn cat' it.
>
> Actually, this is one of the new features in svn 1.1.  If you run 'svn
> cat -r X-1 Bar', then the client should be able to trace the rename, 
> and
> discover the older name (Foo) in revision X, and cat that instead.  It
> certainly works in the commandline client.

I can reproduce the problem with the command line client when using 
URLs and files (I think this was previously mentioned in the thread.) 
I'm not sure if following a file by URL after a rename is intended to 
work?

For example:

touch foobar
svn add foobar
svn ci -m ""

svn mv foobar foobar2
svn ci =m ""

svn cat foobar2 - works as expected
svn cat -r 15 foobar2 - works as expected

svn cat [REPOS_URL]/trunk/foobar2 - works
svn cat -r 15 [REPOS_URL]/trunk/foobar2

svn: File not found: revision 15, path '/trunk/foobar2'

(In revision 15, the file was named "foobar")

Jim


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

Re: svn cat broken by folder rename in repository

Posted by Ben Collins-Sussman <su...@collab.net>.
On Fri, 2004-08-27 at 05:35, Ulrich Eckhardt wrote:
> Simon Large wrote:
> > If I rename a folder in the repository, svn cat seems unable to traverse
> > the rename to get old revisions. This shows up in TortoiseSVN (where I
> > originally reported the problem) when I try to do a visual diff, for which
> > TSVN needs access to both revisions. 
> 
> If you rename from 'Foo' to 'Bar' at revision X, revisions < X don't contain a 
> 'Bar', which is why you can't 'svn cat' it. 

Actually, this is one of the new features in svn 1.1.  If you run 'svn
cat -r X-1 Bar', then the client should be able to trace the rename, and
discover the older name (Foo) in revision X, and cat that instead.  It
certainly works in the commandline client.

> > Using TSVN 1.1.0 RC1, which is built  on SVN 1.1.0 RC2.

... so it seems odd that TSVN based on svn 1.1 isn't doing it.  Are we
sure about this?

For example, in ancient days,
/trunk/subversion/libsvn_wc/update_editor.c used to be named
'get_editor.c'.  If you browse r100 of svn's own repository, you can see
that yourself:

$ svn ls -r100
http://svn.collab.net/repos/svn/trunk/subversion/libsvn_wc

If you're using an svn 1.0 client, it's unable to figure out the old
name of the file:

$ cd subversion/libsvn_wc
$ $ ~/svn-1.0 cat -r100 update_editor.c
[...]
path not found

But not so with a 1.1 client:

$ svn cat -r100 update_editor.c
/*
 * get_editor.c :  routines for update and checkout
 *
[...]

So what is TSVN doing differently?  Perhaps it's invoking the
svn_client_cat() command on a URL, rather than a working file?  That
might explain it.



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

Re: svn cat broken by folder rename in repository

Posted by Ulrich Eckhardt <ec...@satorlaser.com>.
Simon Large wrote:
> If I rename a folder in the repository, svn cat seems unable to traverse
> the rename to get old revisions. This shows up in TortoiseSVN (where I
> originally reported the problem) when I try to do a visual diff, for which
> TSVN needs access to both revisions. 

If you rename from 'Foo' to 'Bar' at revision X, revisions < X don't contain a 
'Bar', which is why you can't 'svn cat' it. 
People are aware of this fact, but this is not easy to do right, as the same 
path within a repository could have been populated by different items 
throughout the history, at least I think that was the problem.

> Using TSVN 1.1.0 RC1, which is built  on SVN 1.1.0 RC2.

That's not specific to TSVN, but a feature of SVN.

Uli

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