From: Sergey Yanovich <ynvich@gmail.com>
To: git@vger.kernel.org, normalperson@yhbt.net
Cc: Sergey Yanovich <ynvich@gmail.com>
Subject: [PATCH 3/3] Fix large-scale exports by 'git-svndump'
Date: Mon, 18 Jun 2007 10:54:03 +0300 [thread overview]
Message-ID: <11821532431437-git-send-email-ynvich@gmail.com> (raw)
In-Reply-To: 11821091382770-git-send-email-ynvich@gmail.com
* 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 <ynvich@gmail.com>
---
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
next reply other threads:[~2007-06-18 7:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-18 7:54 Sergey Yanovich [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-06-18 12:14 git tool to keep a subversion mirror Sergey Yanovich
2007-06-18 12:14 ` [PATCH 1/3] Accept root <tree-ish> in 'git-svn commit-diff' Sergey Yanovich
2007-06-18 12:14 ` [PATCH 2/3] 'git-svndump' Sergey Yanovich
2007-06-18 12:14 ` [PATCH 1/3] Accept root <tree-ish> in 'git-svn commit-diff' Sergey Yanovich
2007-06-18 12:14 ` [PATCH 3/3] Fix large-scale exports by 'git-svndump' Sergey Yanovich
2007-06-18 12:14 ` Sergey Yanovich
2007-06-18 13:22 ` Johannes Sixt
2007-06-19 6:54 [PATCH 1/3] Accept root <tree-ish> in 'git-svn commit-diff' Sergey Yanovich
2007-06-19 6:54 ` [PATCH 2/3] 'git-svndump' Sergey Yanovich
2007-06-19 6:54 ` [PATCH 1/3] Accept root <tree-ish> in 'git-svn commit-diff' Sergey Yanovich
2007-06-19 6:54 ` [PATCH 3/3] Fix large-scale exports by 'git-svndump' Sergey Yanovich
2007-06-19 6:54 ` Sergey Yanovich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11821532431437-git-send-email-ynvich@gmail.com \
--to=ynvich@gmail.com \
--cc=git@vger.kernel.org \
--cc=normalperson@yhbt.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.