Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

So, I've done this before and I just can't seem to figure out what's broken this time...

I'm trying to restore a file from SVN. I went and found the revision where it was deleted (or at least last existed. I verified by using svn list -r)

Here is my command:

svn copy -r 925 url/to/repo/foldername htdocs/foldername

I keep getting an error:

svn: '/!svn/bc/973/.../htdocs/templates' path not found

From my understanding that means its looking in revision 973 (which is HEAD) instead of 925.

What am I missing here?

I'll add my +1 if you can provide an explanation of why it's wrong to use -r XYZ instead of url@XYZ (maybe this is an svn bug?). – Richard Hansen Feb 18, 2012 at 22:53 @RichardHansen: I think the only reason is "Because that's the way it works." I think the SVN project has been moving toward being more forgiving in these areas, and in fact the latest version is much more forgiving about -c vs. -r, etc... I don't know if they've made that particular change or not, though. For an official answer for "why?" I think you'd have to ask the Subversion development team. – Jonathan Hall Feb 18, 2012 at 23:50 I found an explanation: Peg and Operative Revisions. Short version: Using -r REV without @REV means "the ancestor (revsion REV) of the current file" while @REV without -r rev means "the file at REV". This semantic difference is significant because svn tracks copies (and renames). – Richard Hansen Feb 19, 2012 at 0:20

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.