3 Replicate (replay) changesets from one Subversion repository to another.
7 - Meant for replaying history into an **empty** target location. This could be
8 an empty target repo or simply a brand-new folder/branch in the target repo.
9 - Maintains logical history (when possible), e.g. uses "svn copy" for renames.
10 - Maintains original commit messages.
11 - Optionally maintain source author info. (Only supported if target SVN
12 repo doesn't require auth, since this relies upon the `--username`
14 - **Note:** Cannot maintain original commit date, but appends original
15 commit date for each commit message: "Date: %d".
16 - Optionally run an external shell script before each replayed commit
17 to give the ability to dynamically exclude or modify files as part
22 This is a utility for replicating the revision history from a source path in
23 a source SVN repository to a target path in a target SVN repository. In other
24 words, it "replays the history" of a given source SVN repository/branch/path
25 into a target SVN repository/branch/path.
27 This can be useful to create filtered version of a source SVN repository. For
28 example, say that you have a huge SVN repository with a _lot_ of old branch
29 history which is taking up a lot of disk-space and not serving a lot of purpose
30 going forward. You can this utility to replay/filter just the "/trunk" SVN
31 history into a new repository, so that things like "svn log" and "svn blame"
32 will still show the correct (logical) history/ancestry, even though we end-up
33 generating new commits which will have newer commit-dates and revision #'s.
37 See `svn2svn.py --help`
41 **Create a copy of only /trunk from source repo, starting at r5000**
43 $ svnadmin create /svn/target
44 $ svn mkdir -m 'Add trunk' file:///svn/target/trunk
45 $ svn2svn -av -r 5000 http://server/source/trunk file:///svn/target/trunk
47 1. The `target_url` will be checked-out to `./_wc_target`.
48 2. The first commit to `http://server/source/trunk` at/after r5000 will be
49 exported & added into `_wc_target`.
50 3. All revisions affecting `http://server/source/trunk` (starting at r5000)
51 will be replayed to `_wc_target`. Any add/copy/move/replaces that are
52 copy-from'd some path outside of /trunk (e.g. files renamed on a
53 /branch and branch was merged into /trunk) will correctly maintain
54 logical ancestry where possible.
56 **Use continue-mode (-c) to pick-up where the last run left-off**
58 $ svn2svn -avc http://server/source/trunk file:///svn/target/trunk
60 1. The `target_url` will be checked-out to `./_wc_target`, if not already
62 2. All new revisions affecting `http://server/source/trunk` starting from
63 the last replayed revision to `file:///svn/target/trunk` (based on the
64 "`svn2svn:*`" revprops) will be replayed to `_wc_target`, maintaining all
65 logical ancestry where possible.
69 This project borrows a lot of code from the "hgsvn" project. Many thanks to
70 the folks who have contributed to the hgsvn project, for writing code that is
73 * [http://pypi.python.org/pypi/hgsvn](http://pypi.python.org/pypi/hgsvn)
74 * [https://bitbucket.org/andialbrecht/hgsvn/overview](https://bitbucket.org/andialbrecht/hgsvn/overview)
76 This project was originally inspired by this "svn2svn" project:
77 [http://code.google.com/p/svn2svn/](http://code.google.com/p/svn2svn/)
78 That project didn't fully meet my needs, so I forked and ended-up rewriting
79 the majority of the code.
83 * Introduction: "**[svn2svn: Replaying SVN History](http://nynim.org/blog/2012/02/01/svn2svn-replaying-svn-history/)**"
84 * Project page: [http://nynim.org/projects/svn2svn](http://nynim.org/projects/svn2svn)
85 * Source code @ Github: [https://github.com/tonyduckles/svn2svn](https://github.com/tonyduckles/svn2svn)
86 * Source code @ git.nynim.org [http://git.nynim.org/svn2svn.git](http://git.nynim.org/svn2svn.git)