Lost svn directory some time ago.. how do I find out which revision has it?

I lost an svn directory some time ago, but don't know which revision has it? I looked at the log, but I'm guessing it is one of the times there is no comment ;)

13.10.2009 21:15:03

Depending on your svn server you could try to figure out which was the last conntection to the server. You should then look which revision was current at that time.

13.10.2009 21:18:43

Not sure what your platform is, but with TortoiseSVN you can filter revisions by author, comment, and path.

Right-click your working folder, select TortoiseSVN/Show Log, then type the name of your folder in the search box at the top right. It will limit the revisions in the list to ones that match. The top revision in that list will likely be the last that contained a reference to your folder (where it was deleted).

You might need to click the Show All button at the bottom, as it only shows the last 100 revisions by default.

13.10.2009 21:31:58

I wonder if you could write a small script to use the command line svn to try something along the lines of:

  1. For each revision x in a range
  2. Switch to revision x
  3. Compare directory against your working copy
  4. If they match, stop

This would be something to try if someone who knows SVN inside-and-out doesn't come up with a way to quickly do a binary search and compare.

13.10.2009 21:39:30

You can check entire log with verbose switch on and grep the directory you are looking for together with delete flag and grep revision numbers as well:

svn log -v | grep -i -e "   D /path/to/folder" -e "^r[0-9]" | more

Second option is to check the log (with or without verbose switch) on the file itelf by "guessing" revision numbers, for example

svn log svn://repository/deleted/directory -r1337 -v --limit 1

Neither of above are nice approaches, but they will do the trick.

13.10.2009 22:16:55