- Package:
- subversion
- Source:
- subversion
- Description:
- Advanced version control system
- Submitter:
- Paul Menzel
- Date:
- 2010-02-04 15:21:05 UTC
- Severity:
- normal
*** Please type your report below this line *** Dear DDs, I am a little confused. In my project I deleted a file file.tex in r221. $ LANG=C svn log -vr 221 ------------------------------------------------------------------------ r221 | x | *** | * lines Changed paths: D /a/file.tex Later I wanted to undo this change and tried to follow [1]. But I got the following error. $ LANG=C svn cp --revision 220 https://server/svn/z/a/file.tex . svn: Unable to find repository location for 'https://server/svn/z/a/file.tex' in revision 220 Strangely yesterday the path looked a bit different. svn: »/svn/z/!svn/bc/244/a/file.tex« Pfad nicht gefunden Then I commited a change r245 and got with log. $ svn log --revision 219 https://server/svn/z/a/file.tex svn: »/svn/a/!svn/bc/245/a/file.tex« Pfad nicht gefunden See how svn tries to look under path with the *current* revision number. Maybe there is the culprit. Anyway, after recreating the file manually I remembered to have access to a different machine with a subversion package from etch. Everything worked there as expected. $ LANG=C dpkg -l libsvn1 Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad) ||/ Name Version Description +++-==============-==============-============================================ ii libsvn1 1.4.4dfsg1-1 Shared libraries used by Subversion $ svn cp --revision 220 https://server/svn/z/a/file.tex . A file.tex Do you have an idea, what might be the problem? Thanks, Paul [1] http://svnbook.red-bean.com/en/1.0/ch04s04.html (Resurrecting Deleted Items)
Hi, Yep, this looks like it's broken... % svn log -v -r 3006 | grep foo.php M /full/path/foo.php % svn log -v -r 3006 foo.php svn: Unable to find repository location for 'https://correct.host/svn/full/path/foo.php' in revision 3006 % svn diff -r 3005:3006 foo.php svn: Unable to find repository location for 'foo.php' in revision 3005 I'm thinking that the problem in my case is that in revision 3123 I replaced foo.php with a symbolic link. 'svn log' with no arguments for that file now shows only that revision. So it looks like there is no obvious way to go back in history and explicitly look at a lifespan of a particular file that doesn't match its current lifespan.
[Josip Rodin]
[...]
You're correct, svn considers foo.php the file and foo.php the symlink
to be two unrelated files that have had the same name.
To tell it where in history to look for the file of a particular name,
what you want is a peg revision and a URL (or URL equivalent, using ^/
to represent the top of the repository tree). A peg revision uses
URL@REV syntax, and generally defaults to HEAD for a URL.
% svn log -v -r3006 ^/full/path/foo.php@3006
Here, @3006 means "history of which file?" and r3006 means "which part
of the history?" Alternatively if it offends you to have to type 3006
twice, note that -r has a default of "3006:1":
% svn log -v --limit=1 ^/full/path/foo.php@3006
Peg revisions trip a lot of people up and in hindsight I think many of
us wish they'd been introduced with a more obvious syntax, or that they
defaulted to the operative revision (the -r argument) rather than HEAD.
There are good arguments both ways as to whether the default should
have been HEAD (or, for a working copy path, BASE, i.e., the revision
at which the working copy path is checked out).
Agreed, depending on your definition of "obvious".