1

I would like to move the folder from one repository to another (while preserving all history, of course). I followed some of the answers to the question "How to move a single folder from one Subversion repository to another repository?" In particular, I tried the commands:

svnadmin.exe dump H:\Repositories\RepSource > W:\temp\RepSource.dump
svndumpfilter.exe include "trunk\Sources\folderToMove" --drop-empty-revs --renumber-revs --preserve-revprops < W:\temp\RepSource.dump > W:\temp\RepSource_filtered.dump    
svnadmin.exe load "H:\Repositories\RepDest" < W:\temp\RepSource_filtered.dump

RepDest is an empty repository that I created just for testing. Dumping runs successfully; filtering too, according to the output, which shows that all folders were dropped but the specified one. Loading has some issues; it has the output:

<<< Started new transaction, based on original revision 1
 * editing path : trunk/Sources/folderToMove/theFile.mxml ...svnadmin: File not found: transaction '0-1', path 'trunk/Sources/folderToMove/theFile.mxml'

"theFile.mxml" is the file that is inside of the "folderToMove" folder.

I noticed some magic: when in svndumpfilter, I've added a backslash to the end of include path:

svndumpfilter.exe include "trunk\Sources\folderToMove\" --drop-empty-revs --renumber-revs --preserve-revprops < W:\temp\RepSource.dump > W:\temp\ RepSource_filtered.dump

The output is the following:

<<< Started new transaction, based on original revision 1

------- Committed revision 1 >>>

<<< Started new transaction, based on original revision 2

------- Committed revision 2 >>>

<<< Started new transaction, based on original revision 3

------- Committed revision 3 >>>

<<< Started new transaction, based on original revision 4

------- Committed revision 4 >>>

<<< Started new transaction, based on original revision 5

------- Committed revision 5 >>>

<<< Started new transaction, based on original revision 6

------- Committed revision 6 >>>

<<< Started new transaction, based on original revision 7

------- Committed revision 7 >>>

<<< Started new transaction, based on original revision 8

------- Committed revision 8 >>>

<<< Started new transaction, based on original revision 9

------- Committed revision 9 >>>

<<< Started new transaction, based on original revision 10

------- Committed revision 10 >>>

<<< Started new transaction, based on original revision 11

------- Committed revision 11 >>>

<<< Started new transaction, based on original revision 12

------- Committed revision 12 >>>

<<< Started new transaction, based on original revision 13

------- Committed revision 13 >>>

<<< Started new transaction, based on original revision 14

------- Committed revision 14 >>>

<<< Started new transaction, based on original revision 15

------- Committed revision 15 >>>

It seems to be successful, but when I look into the RepDest repository (with TortoiseSVN->Repo Browser, or VisualSVN Server Manager), there is nothing in it. It stays empty. HEAD revision number is 0. But if I look into this repository with:

svnlook tree H:\Repositories\RepDest -r 5

I again see the empty repository, but it recognizes the revision number. All revision numbers from 1 to 15 are being handled correctly. For testing, "-r 16" causes svnlook to say to me that this revision does not exist.

I've also checked the size of RepDest repository folder—it is the same before and after loading.

What's wrong here ? Any ideas ?

Community
  • 1
  • 1
AntonAL
  • 16,692
  • 21
  • 80
  • 114
  • Also, i noticed following: This problem occurs only, if "trunk\Sources\folderToMove" contains files and subfolders. In case, if it contains only files, importing will be successful. I tried to specified in include option both subfolders and files delimited with space, but i get the same result "file not found" – AntonAL Dec 27 '09 at 12:30

1 Answers1

0

Take a look at the help for the svnadmin load command. Did you specify the --parent-dir parameter when you loaded the directory in your repository? Otherwise, it'll go into the wrong directory.

You must load that directory into a non-existant directory in your current repository via the --parent-dir parameter. From the command you're showing, it looks like you didn't specify where this directory should go. I don't remember, but I also believe you have to create this empty parent directory in your repository before doing a load.

And, of course, backup and shutdown Subversion before you do a svnadmin load.

David W.
  • 105,218
  • 39
  • 216
  • 337