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 w开发者_运维问答hich revision has it? I looked at the log, but I'm guessing it is one of the times there is no comment ;)
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.
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.
I wonder if you could write a small script to use the command line svn to try something along the lines of:
- For each revision x in a range
- Switch to revision x
- Compare directory against your working copy
- 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.
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.
精彩评论