svn-merge-repos
NAME
svn-merge-repos.pl - Merge SVN repositories into one, in rev/date order
SYNOPSIS
svn-merge-repos [options] -t repos[/subdir] repos[/ssubdir]:tsubdir...
OPTIONS
-
--help or -h
This help.
-
--man or -m
More help.
-
--svn=/path/to/svn or -s cmd
Use this 'svn' command.
-
--svnadmin=/path/to/svnadmin or -a cmd
Use this 'svnadmin' command.
-
--svndumpfilter=/path/to/svndumpfilter of -d cmd
Use this 'svndumpfilter' command.
-
--target=repos_path/subdir or -t path/dir
Path to destination repository, possibly within the specified sub directory. You cannot merge several repositories within the very same destination directory.
-
--source
Add a 'merge:source' revision property to tell the revision source. Revision property changes must be allowed on the target repos in order to do so.
-
--verbose or -v
Be verbose. Repeat for more.
-
--version or -V
Show script revision and exit.
ARGUMENTS
Arguments are of the form 'repos_path/ssubdir:tsubdir'. The source sub-directory 'ssubdir' of the source repository is merged into the specified target sub directory 'subdir/tsubdir' in the target repository.
NOTES
Revisions are exported and imported thanks to the 'svnadmin' command. This means that an actual filesystem path to the repository is necessary. URL-based subversion repository path will not work.
The sorting is based on revision numbers within a given source, and on dates between different sources. The resulting merged revisions are not fully sorted with respect to dates, as other prior commits in the same repository keep their original dates.
Do not merge big and pretty independent repositories. Consider using 'svn:external' properties prior to merging repositories.
To split a repository, 'svnadmin dump' + 'svndumpfilter include' are your friends.
It is a very bad idea to use the repository while the merge is in progress.
Do not trust hardware. Do not trust software either. Always backup your data, especially before running any automatic thing such as this script.
EXAMPLE
sh> svn-merge-repos.pl -t ./proj ./foo/trunk:proj1 ./bla/trunk:proj2
Merge "trunk" of repositories "foo" and "bla" as subdirectories "proj1" and "proj2" in repository "proj".
BUGS
All softwares have bugs, this is a software, hence...
The documentation is scarce.
I'm unsure about what happens with svn copies. Just merge your trunk?
Dates are in some timezone. What happens around daylight time changes?
The sorting breaks around year 10000. Shame on me, but I'll be dead by then.
LICENSE
(c) 2006-2010 Fabien COELHO <svn-merge-repos at coelho dot net> http://www.coelho.net/.
This is free software, both inexpensive and available with sources. The GNU General Public License v3 or more applies (GPLv3+). The brief summary is: You get as much as you paid for, and I am not responsible for anything. See http://www.gnu.org/copyleft/gpl.html for details.
If you are very happy with this software, I would appreciate if you could send a postcard mentioning it (see my web page for current address).
DOWNLOAD
The latest version of the script is available at http://www.coelho.net/svn-merge-repos.pl.
SEE ALSO
Subversion at http://subversion.apache.org/.
svndumptool at http://svn.borg.ch/svndumptool/, by Martin Furter: a set of python classes and a command to manipulate svn dump files. Although it may be less straightforward, it should do a better job especially if you want to reorganize 'branches' and 'tags' directories.
svnfusion at http://svnfusion.sourceforge.net. by Marcos Mayorga: a bash script which merges full repositories, with few options available.
VERSION
This documentation is about $Revision: 659 $ of the script.