From 71d8ec57df3dfaf2bf68f26b8aff5eaffc896115 Mon Sep 17 00:00:00 2001 From: Tony Duckles Date: Sat, 4 Aug 2012 23:04:01 -0500 Subject: [PATCH] Rename main utility from 'svn2svn.py' to 'svnreplay.py' Rename the main utility executable for several reasons: * Avoid overlapping with the 'svn2svn' module subdirectory. * Make way for having other support utilities in the top-level folder. --- README.mkd | 16 ++++++++-------- svn2svn.py | 4 ---- svn2svn/run/{svn2svn.py => svnreplay.py} | 16 ++++++++-------- svn2svn/shell.py | 2 +- svn2svn/svnclient.py | 2 +- svnreplay.py | 4 ++++ tests/make-replay-repo.sh | 14 +++++++------- 7 files changed, 29 insertions(+), 29 deletions(-) delete mode 100755 svn2svn.py rename svn2svn/run/{svn2svn.py => svnreplay.py} (99%) create mode 100755 svnreplay.py diff --git a/README.mkd b/README.mkd index fd0a0b1..67b39ac 100644 --- a/README.mkd +++ b/README.mkd @@ -54,13 +54,13 @@ over standard `http://`, `svn://`, `svn+ssh://`, etc. methods. Usage ----- -See `svn2svn.py --help`: +See `svnreplay.py --help`: - $ ./svn2svn.py --help - svn2svn, version 1.5.0 + $ ./svnreplay.py --help + svn2svn, version 1.6.0 - Usage: svn2svn.py [OPTIONS] source_url target_url + Usage: svnreplay.py [OPTIONS] source_url target_url Replicate (replay) history from one SVN repository to another. Maintain logical ancestry wherever possible, so that 'svn log' on the replayed repo @@ -70,7 +70,7 @@ See `svn2svn.py --help`: Create a copy of only /trunk from source repo, starting at r5000 $ svnadmin create /svn/target $ svn mkdir -m 'Add trunk' file:///svn/target/trunk - $ svn2svn -av -r 5000 http://server/source/trunk file:///svn/target/trunk + $ svnreplay -av -r 5000 http://server/source/trunk file:///svn/target/trunk 1. The target_url will be checked-out to ./_wc_target 2. The first commit to http://server/source/trunk at/after r5000 will be exported & added into _wc_target @@ -81,7 +81,7 @@ See `svn2svn.py --help`: logical ancestry where possible. Use continue-mode (-c) to pick-up where the last run left-off - $ svn2svn -avc http://server/source/trunk file:///svn/target/trunk + $ svnreplay -avc http://server/source/trunk file:///svn/target/trunk 1. The target_url will be checked-out to ./_wc_target, if not already checked-out 2. All new revisions affecting http://server/source/trunk starting from @@ -152,7 +152,7 @@ Examples $ svnadmin create /svn/target $ svn mkdir -m 'Add trunk' file:///svn/target/trunk - $ svn2svn -av -r 5000 http://server/source/trunk file:///svn/target/trunk + $ svnreplay -av -r 5000 http://server/source/trunk file:///svn/target/trunk 1. The `target_url` will be checked-out to `./_wc_target`. 2. The first commit to `http://server/source/trunk` at/after r5000 will be @@ -165,7 +165,7 @@ Examples **Use continue-mode (-c) to pick-up where the last run left-off** - $ svn2svn -avc http://server/source/trunk file:///svn/target/trunk + $ svnreplay -avc http://server/source/trunk file:///svn/target/trunk 1. The `target_url` will be checked-out to `./_wc_target`, if not already checked-out diff --git a/svn2svn.py b/svn2svn.py deleted file mode 100755 index 8ec35a5..0000000 --- a/svn2svn.py +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env python -from svn2svn.run.svn2svn import main - -main() diff --git a/svn2svn/run/svn2svn.py b/svn2svn/run/svnreplay.py similarity index 99% rename from svn2svn/run/svn2svn.py rename to svn2svn/run/svnreplay.py index aac7143..77e1061 100644 --- a/svn2svn/run/svn2svn.py +++ b/svn2svn/run/svnreplay.py @@ -2,12 +2,12 @@ Replicate (replay) changesets from one SVN repository to another. """ -from .. import base_version, full_version -from .. import ui -from .. import shell -from .. import svnclient -from ..shell import run_svn,run_shell_command -from ..errors import (ExternalCommandFailed, UnsupportedSVNAction, InternalError, VerificationError) +from svn2svn import base_version, full_version +from svn2svn import ui +from svn2svn import shell +from svn2svn import svnclient +from svn2svn.shell import run_svn,run_shell_command +from svn2svn.errors import (ExternalCommandFailed, UnsupportedSVNAction, InternalError, VerificationError) from parse import HelpFormatter from breakhandler import BreakHandler @@ -1151,7 +1151,7 @@ Examples: Create a copy of only /trunk from source repo, starting at r5000 $ svnadmin create /svn/target $ svn mkdir -m 'Add trunk' file:///svn/target/trunk - $ svn2svn -av -r 5000 http://server/source/trunk file:///svn/target/trunk + $ svnreplay -av -r 5000 http://server/source/trunk file:///svn/target/trunk 1. The target_url will be checked-out to ./_wc_target 2. The first commit to http://server/source/trunk at/after r5000 will be exported & added into _wc_target @@ -1162,7 +1162,7 @@ Examples: logical ancestry where possible. Use continue-mode (-c) to pick-up where the last run left-off - $ svn2svn -avc http://server/source/trunk file:///svn/target/trunk + $ svnreplay -avc http://server/source/trunk file:///svn/target/trunk 1. The target_url will be checked-out to ./_wc_target, if not already checked-out 2. All new revisions affecting http://server/source/trunk starting from diff --git a/svn2svn/shell.py b/svn2svn/shell.py index 3dfecbf..c7ca776 100644 --- a/svn2svn/shell.py +++ b/svn2svn/shell.py @@ -1,6 +1,6 @@ """ Shell functions """ -from . import ui +from svn2svn import ui from errors import ExternalCommandFailed import os diff --git a/svn2svn/svnclient.py b/svn2svn/svnclient.py index d05094b..ba5c649 100644 --- a/svn2svn/svnclient.py +++ b/svn2svn/svnclient.py @@ -322,7 +322,7 @@ def iter_svn_log_entries(svn_url, first_rev, last_rev, stop_on_copy=False, get_c --> would yield r5, i.e. the _initial_ creation svn log --stop-on-copy --limit 1 -r 1:HEAD "path/to/file" --> would yield r5000, i.e. the _re-creation_ - Use run/svn2svn.py:find_svn_ancestors() to pass in the 'ancestors' array + Use run/svnreplay.py:find_svn_ancestors() to pass in the 'ancestors' array so that we can correctly re-trace ancestry here. """ svn_info = info(svn_url) diff --git a/svnreplay.py b/svnreplay.py new file mode 100755 index 0000000..bb2b39f --- /dev/null +++ b/svnreplay.py @@ -0,0 +1,4 @@ +#!/usr/bin/env python +from svn2svn.run.svnreplay import main + +main() diff --git a/tests/make-replay-repo.sh b/tests/make-replay-repo.sh index d2d260a..c48775b 100755 --- a/tests/make-replay-repo.sh +++ b/tests/make-replay-repo.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Use svn2svn.py to create a filtered repo with only /trunk history +# Use svnreplay to create a filtered repo with only /trunk history PWD=$(pwd) PWDURL=$(echo "file://$PWD" | sed 's/\ /%20/g') @@ -18,14 +18,14 @@ cp ../hook-examples/pre-revprop-change_example.txt "$REPO/hooks/pre-revprop-chan chmod 755 "$REPO/hooks/pre-revprop-change" echo "" -## svn2svn / -#../svn2svn.py $* $PWDURL/_repo_ref $PWDURL/_repo_replay +## svnreplay / +#../svnreplay.py $* $PWDURL/_repo_ref $PWDURL/_repo_replay -# svn2svn /trunk +# svnreplay /trunk svn mkdir -q -m "Add /trunk" $REPOURL/trunk -../svn2svn.py $* $PWDURL/_repo_ref/trunk $PWDURL/_repo_replay/trunk +../svnreplay.py $* $PWDURL/_repo_ref/trunk $PWDURL/_repo_replay/trunk -## svn2svn /trunk/Module2/ProjectB +## svnreplay /trunk/Module2/ProjectB #svn mkdir -q -m "Add /trunk" $REPOURL/trunk #svn mkdir -q --parents -m "Add /trunk/Module2/ProjectB" $REPOURL/trunk/Module2/ProjectB -#../svn2svn.py $* $PWDURL/_repo_ref/trunk/Module2/ProjectB $PWDURL/_repo_replay/trunk/Module2/ProjectB +#../svnreplay.py $* $PWDURL/_repo_ref/trunk/Module2/ProjectB $PWDURL/_repo_replay/trunk/Module2/ProjectB -- 2.45.2