-1

This is what I am trying to accomplish

Project_A
    -SubFolder_Y
         Project_X

Project_B
    Project_X

So basically migrating the subdirectory 'Project_X' from Project A to the root of Project B with all the revisions.

I am trying to use svnadmin commands since I have access to the SVN server.

I know I wanted to so something along the line of:

1. svnadmin dump \\Repositories\Project_A > ProjectA.dump
2. svndumpfilter include Project_X --drop-empty-revs --renumber-revs < Project_A.dump > Project_X.dump 
3. svnadmin load --ignore-uuid \\Repositories\Project_B <Project_X.dump

This doesn't seem to work, what am I missing here?

Thanks in advance!!!

  • ProjectA and ProjectB are different repositories, right? – bahrep Jan 31 '17 at 00:49
  • *This doesn't seem to work, what am I missing here?* -- what exactly does not work? Do you get any errors? – bahrep Jan 31 '17 at 00:49
  • @bahrep Yes ProjectA and ProjectB are different. The above code would also keep 'SubFolder_Y' as the parent of Project_X which I do not want. – Dev Albino Jan 31 '17 at 01:01

1 Answers1

0

First and foremost, you have to read SVNBook chapter about repository history filtering. And don't svnadmin load the dump to real repository before you test it with some test repo. You must ensure that the filtered dump that svndumpfilter generates contains all the data you expect and want it contain.

The above code would also keep 'SubFolder_Y' as the parent of Project_X which I do not want

This is covered in the doc chapter linked above. SVNBook suggests that you edit your dump files manually with a text editor or via script rewriting or removing the parent path (SubFolder__Y in your case). Complexity of this task depends on the number of revisions in your dump file, its size, repository paths etc. But in general, this is a non-trivial and potentially dangerous task and I'd recommend that you avoid modifying dump files manually.

Instead of rewriting parent paths, you could move Project_X to the root of the new repository after loading the filtered dump.

The command should be as follows:

svn move FROM-URL TO-URL -m "ENTER LOG MESSAGE"

bahrep
  • 29,961
  • 12
  • 103
  • 150