From: Sergey Yanovich <ynvich@gmail.com>
To: git@vger.kernel.org, normalperson@yhbt.net, Matthieu.Moy@imag.fr
Cc: Sergey Yanovich <ynvich@gmail.com>
Subject: [PATCH 3/3] Fix large-scale exports by 'git-svndump'
Date: Mon, 18 Jun 2007 15:14:04 +0300 [thread overview]
Message-ID: <11821688462083-git-send-email-ynvich@gmail.com> (raw)
Message-ID: <1cfe105017cb4bc44d54c6283b5185a73c4e84d8.1182168501.git.ynvich@gmail.com> (raw)
In-Reply-To: <11821688462290-git-send-email-ynvich@gmail.com>
In-Reply-To: <4e79874760c3773448d886608d6db7bbda3c97f2.1182168501.git.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 prev parent reply other threads:[~2007-06-18 12:14 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-17 18:49 git tool to keep a subversion mirror Sergey Yanovich
2007-06-17 21:09 ` Matthieu Moy
2007-06-18 6:42 ` Sergey Yanovich
[not found] ` <4e79874760c3773448d886608d6db7bbda3c97f2.1182168501.git.ynvich@gmail.com>
2007-06-18 12:14 ` [PATCH 1/3] Accept root <tree-ish> in 'git-svn commit-diff' Sergey Yanovich
2007-06-18 13:20 ` Johannes Sixt
[not found] ` <98e24b3eb0a0d34100d5ab9db052efaaa140c4ac.1182168501.git.ynvich@gmail.com>
2007-06-18 12:14 ` [PATCH 2/3] 'git-svndump' Sergey Yanovich
2007-06-18 12:26 ` Charlie Shepherd
[not found] ` <1cfe105017cb4bc44d54c6283b5185a73c4e84d8.1182168501.git.ynvich@gmail.com>
2007-06-18 12:14 ` Sergey Yanovich [this message]
2007-06-18 13:22 ` [PATCH 3/3] Fix large-scale exports by 'git-svndump' Johannes Sixt
2007-06-24 7:45 ` git tool to keep a subversion mirror Jan Hudec
-- strict thread matches above, loose matches on Subject: below --
2007-06-18 7:54 [PATCH 3/3] Fix large-scale exports by 'git-svndump' Sergey Yanovich
2007-06-18 12:14 git tool to keep a subversion mirror Sergey Yanovich
[not found] ` <cff8d32813e43d9e1c75ad50824d95dbcd6f669c.1182235491.git.ynvich@gmail.com>
2007-06-19 6:54 ` [PATCH 1/3] Accept root <tree-ish> in 'git-svn commit-diff' Sergey Yanovich
[not found] ` <ad3394d949e01bf962120ad69f59f4017ca5466b.1182235492.git.ynvich@gmail.com>
2007-06-19 6:54 ` [PATCH 3/3] Fix large-scale exports by 'git-svndump' Sergey Yanovich
2007-06-20 6:25 ` [PATCH 1/3] Accept root <tree-ish> in 'git-svn commit-diff' Eric Wong
2007-06-20 9:20 ` Sergey Yanovich
[not found] ` <7d5543ebd8ac45e49a6d3f300e988189561512f1.1182235492.git.ynvich@gmail.com>
2007-06-19 6:54 ` [PATCH 2/3] 'git-svndump' Sergey Yanovich
2007-06-20 6:40 ` Eric Wong
2007-06-20 9:47 ` 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=11821688462083-git-send-email-ynvich@gmail.com \
--to=ynvich@gmail.com \
--cc=Matthieu.Moy@imag.fr \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).