Difference between revisions of "Subversion"

From RobolaboWiki
Jump to: navigation, search
Line 16: Line 16:
 
<pre>
 
<pre>
 
svnadmin create <SVN_REPO_NAME>
 
svnadmin create <SVN_REPO_NAME>
svnadmin load <SVN_DUMPFILE_NAME> < <SVN_REPO_NAME>
+
svnadmin load --ignore-uuid <SVN_DUMPFILE_NAME> < <SVN_REPO_NAME>
 
</pre>
 
</pre>
  
Line 44: Line 44:
 
3) Remove all  the references to the top directory (e.g. in vim)
 
3) Remove all  the references to the top directory (e.g. in vim)
 
<pre>
 
<pre>
%s/2007-2008//g
+
%s/Node-path: 2007-2008/Node-path: /g
 
</pre>
 
</pre>

Revision as of 21:33, 8 January 2013


Subversion Manager

Dump

To create a file with all the repo

svnadmin dump <SVN_REPO_NAME> > <SVN_DUMPFILE_NAME>

Load

To create a repo from a dump file

svnadmin create <SVN_REPO_NAME>
svnadmin load --ignore-uuid <SVN_DUMPFILE_NAME> < <SVN_REPO_NAME>

Filter

To create a repo file with a specific directory within the dump file

svndumpfilter include <PATH_TO_DESIRED_DIR> --drop-empty-revs --renumber-revs --preserve-revprops < <SVN_DUMPFILE_NAME> > <SVN_DESIRED_DIR_DUMPFILE_NAME>

However, the <SVN_DESIRED_DIR_DUMPFILE_NAME> keeps the directory structure of the old repo. If you want to delete it:


1) Edit <SVN_DESIRED_DIR_DUMPFILE_NAME> 2) Remove the top directory (e.g.):

Node-path: 2007-2008
Node-action: add
Node-kind: dir
Prop-content-length: 10
Content-length: 10

PROPS-END

3) Remove all the references to the top directory (e.g. in vim)

%s/Node-path: 2007-2008/Node-path: /g