* Split revision list using 'tail' shell command.
* Wrap multiple list generation in an endless cycle with 'while true'.
Exit from cycle when the current list is empty.
* Improve handling of merges by adding '--no-merges --topo-order'i
arguments to the list generating command.
Signed-off-by: Sergey Yanovich <redacted>
---
git-svndump-sync.sh | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/git-svndump-sync.sh b/git-svndump-sync.sh
index e1c04e1..516edaf 100755
--- a/git-svndump-sync.sh
+++ b/git-svndump-sync.sh
@@ -70,7 +70,14 @@ if test -f $GIT_DIR/svndump/last ; then
fi
fi
-list=`GIT_DIR=$GIT_DIR git-rev-list $commit $start`
+while true ; do
+
+list=`GIT_DIR=$GIT_DIR git-rev-list --no-merges --topo-order $commit $start |
+tail -n 8`
+
+if test -z "$list" ; then
+ exit 0
+fi
diffs=""
for c in $list ; do
@@ -79,7 +86,14 @@ done
for c in $diffs ; do
GIT_DIR=$GIT_DIR git-svn commit-diff -r$rev $last $c $url
+ if test $? -ne 0 ; then
+ exit $?
+ fi
echo "$c" > $GIT_DIR/svndump/last
last=$c
let rev++
done
+
+start=^$last
+
+done
--
1.5.2.1