You are hereBlogs / David Grant's blog / Interesting svn Recovery Problem

Interesting svn Recovery Problem


By David Grant - Posted on 31 July 2006

I was just trying to recover some files from a subversion repository at work that were deleted a few revisions ago. Here's what happened:

update to old revision where directory jlamothe still exists:

$ svn -r 2444 up -q

directory jlamothe is there in revision 2444:

$ ls
cjm  david  jlamothe  pix  wgm

updated to HEAD, jlamothe got deleted in HEAD:

$ svn up
D    jlamothe
Updated to revision 2477.

see, it is gone:

$ ls
cjm  david  pix  wgm

trying to recover:

$ svn cp -r 2444 svn+ssh://david@weatherwax/svn/repos/Docs/jlamothe . -q
svn: The URL 'svn+ssh://david@weatherwax/svn/repos/Docs/jlamothe' has a different repository root than its parent

it's there:

$ ls
Bryght  D-Wave  acheron  cjm  david  jlamothe  pix  wgm

but it wasn't scheduled for addition? although the files beneath it were.

$ svn st
?      jlamothe
M      david/decomposition.tex

This had me stumped for a long time. It turns out it was the "svn: The URL 'svn+ssh://david@weatherwax/svn/repos/Docs/jlamothe' has a different repository root than its parent" that was the problem. For some reason because I used a slightly different URL (although equivalent, thanks to my /etc/hosts file) it didn't schedule it, as if it wasn't even part of this working directory...as if I had created a new working directory within another working directory.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote> <s> <img> <h2> <h3>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. The supported tag styles are: <foo>, [foo].
  • Insert Google Map macro.
  • Images can be added to this post.
  • You may use [inline:xx] tags to display uploaded files or images inline.
  • You may use [view:name=display=args] tags to display views.

More information about formatting options

CAPTCHA
Sorry I had to add this test to combat the spam problem.
B
x
G
z
r
w
Enter the code without spaces and pay attention to upper/lower case.