Is it possible to cancel imports in subversive activities?

By chance, I called "svn import ..." in the wrong directory. Is there any reasonable way to undo this error?

Googling I did not find a useful answer, and the closest to my problem, which I found on stackoverflow, was importing the correct data to the wrong place , while I was importing the wrong data to the right place.

And: the repository is not new, so deleting it is out of the question.

It would be ironic if I could not cancel the operations in the version control system. So can someone help me? (Thanks!)

EDIT: I got my repository stored in the Berkley database, i.e. in the file system. Considering the date of the change of all files / directories and the contents of the files just changed, I was able to decide what to do, except for one: does anyone know what the txn-current file is for? I assume that it is associated with transaction processing, but what is the meaning of its contents (length 2 bytes)?

EDIT 2: Thanks for the helpful answers. I accepted Martin's answer as it should provide an appropriate way to do this (because I, under pressure of time, I just deleted some files as my first EDIT hinted, ignoring the contents of txn-current and waiting until now). But look at the link that Wim gave in his comment!

+6
svn
source share
2 answers

If there were no other commits since you imported your files, you can easily delete the latest revision using svn dump .

The following example is taken from this page :

  • (assuming changes 1-125 are fine, 126 is the latest revision causing the problem)
  • make a backup copy of the repository, and then unload the repository (except for the latest revision):
    • > svnadmin dump -r1:125 myrepo > my.dump
  • now create a new repository and load the dump:
    • > svnadmin create myrepo
    • > svnadmin load myrepo < my.dump
+10
source share

You cannot undo the commit directly, the only way to do this is to do svnadmin dump , remove the commit from the dump file (either manually, using a text editor, or using svndumpfilter and svnadmin load again.

If this is not a real problem, that the data remains somewhere in the repository as an older revision, you can just svn delete and do something else.

+11
source share

All Articles