Reputation: 23319
I did a mistake importing in an import to some SubVersion repository, and I want to revert this import.
How can I do that?
My mistake was this: Given a folder with subfolders
a \
a \ a1
a \ b1
a \ c1
I wanted to import the folder a inside a repository folder F, so the structure in the repository be
F\a
but I imported the folders a1, b1 and c1 and the repository now is
F \ a1
F \ b1
F \ c1
I'm using Tortoise Svn, so if your instructions are in terms of that, are better.
Upvotes: 1
Views: 3199
Reputation: 3773
I see three choices. Using a GUI like TortoiseSVN could make things easier.
Fix it where you're at
Delete repository and try again
Revert change and try again
Upvotes: 0
Reputation: 9301
svn mkdir repo-base/a
svn mv repo-base/a1 repo-base/a/
svn mv repo-base/b1 repo-base/a/
svn mv repo-base/c1 repo-base/a/
where repo-base is e.g. https://svn.my.net/svn/project/trunk/
then, when you're done, check it out locally.
renaming files and moving whole directories is most reliably achieved by issuing the commands against remote paths in my experience.
Upvotes: 3
Reputation: 62914
Is this the first import for the repository? Just nuke, recreate, and re-import (but do it this time).
If you were importing the tree into something other than a brand new repository, you'll have to do a bit more.
Upvotes: 0