By accident I called “svn import …” in the wrong directory. Is there a sensible way to undo this mistake?
Googling I didn’t find any useful answer, and the closest to my problem I found on stackoverflow was importing the correct data to the wrong place, whereas I imported the wrong data to the correct place.
And: the repository is NOT new, so deleting it is out of question.
It would be a kind of ironic, if I couldn’t undo operations in a version control system. So can someone help me? (Thanks!)
EDIT: I got my repository stored in a Berkley Database, i.e., it’s in the file system. Looking at the modification date of all files/directories and at the content of the just modified files I was able to work out what to do except for one thing: does anybody know what’s the file txn-current is for? I guess it’s connected to the transaction handling, but what’s the meaning of its content (length is 2 bytes)?
EDIT 2: Thanks for both helpful answers. I accepted Martin’s answer as it should provide the proper way of doing it (as I’m under time pressure I just deleted some files as hinted in my first EDIT ignoring the content of txn-current and live fine with until now). But check out the link Wim gave in his comment!
If there were no other commits since you imported your files, then you can easily delete the last revision using
svn dump.The following example is taken from this page:
> svnadmin dump -r1:125 myrepo > my.dump> svnadmin create myrepo> svnadmin load myrepo < my.dump