git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3/3] Fix large-scale exports by 'git-svndump'
@ 2007-06-18  7:54 Sergey Yanovich
  0 siblings, 0 replies; 4+ messages in thread
From: Sergey Yanovich @ 2007-06-18  7:54 UTC (permalink / raw)
  To: git, normalperson; +Cc: Sergey Yanovich

* 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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 3/3] Fix large-scale exports by 'git-svndump'
       [not found]       ` <1cfe105017cb4bc44d54c6283b5185a73c4e84d8.1182168501.git.ynvich@gmail.com>
@ 2007-06-18 12:14         ` Sergey Yanovich
  2007-06-18 13:22           ` Johannes Sixt
  0 siblings, 1 reply; 4+ messages in thread
From: Sergey Yanovich @ 2007-06-18 12:14 UTC (permalink / raw)
  To: git, normalperson, Matthieu.Moy; +Cc: Sergey Yanovich

* 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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 3/3] Fix large-scale exports by 'git-svndump'
  2007-06-18 12:14         ` [PATCH 3/3] Fix large-scale exports by 'git-svndump' Sergey Yanovich
@ 2007-06-18 13:22           ` Johannes Sixt
  0 siblings, 0 replies; 4+ messages in thread
From: Johannes Sixt @ 2007-06-18 13:22 UTC (permalink / raw)
  To: git

Sergey Yanovich wrote:
> 
> * 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.

Please don't just repeat what can be seen in the patch anyway. Tell us
what this is good for, and which problems it solves.

-- Hannes

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 3/3] Fix large-scale exports by 'git-svndump'
       [not found]     ` <ad3394d949e01bf962120ad69f59f4017ca5466b.1182235492.git.ynvich@gmail.com>
@ 2007-06-19  6:54       ` Sergey Yanovich
  0 siblings, 0 replies; 4+ messages in thread
From: Sergey Yanovich @ 2007-06-19  6:54 UTC (permalink / raw)
  To: git, normalperson, J.Sixt, masterdriverz; +Cc: Sergey Yanovich

This is an empty patch. It is generated only to preserve headers
([PATCH x/y] ...) for two previous patches. May/should be ignored.

Thanks to Johannes Sixt <J.Sixt@eudaptics.com> for comments.

Signed-off-by: Sergey Yanovich <ynvich@gmail.com>
---
 git-svndump-sync.sh |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/git-svndump-sync.sh b/git-svndump-sync.sh
index 602af72..b3e47f9 100755
--- a/git-svndump-sync.sh
+++ b/git-svndump-sync.sh
@@ -96,3 +96,4 @@ done
 start=^$last
 
 done
+
-- 
1.5.2.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-06-19  6:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-18  7:54 [PATCH 3/3] Fix large-scale exports by 'git-svndump' Sergey Yanovich
  -- 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
     [not found]     ` <4e79874760c3773448d886608d6db7bbda3c97f2.1182168501.git.ynvich@gmail.com>
     [not found]       ` <1cfe105017cb4bc44d54c6283b5185a73c4e84d8.1182168501.git.ynvich@gmail.com>
2007-06-18 12:14         ` [PATCH 3/3] Fix large-scale exports by 'git-svndump' 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
     [not found]   ` <cff8d32813e43d9e1c75ad50824d95dbcd6f669c.1182235491.git.ynvich@gmail.com>
     [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

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).