All of lore.kernel.org
 help / color / mirror / Atom feed
* git tool to keep a subversion mirror
@ 2007-06-18 12:14 Sergey Yanovich
  2007-06-19  6:54   ` Sergey Yanovich
  0 siblings, 1 reply; 19+ messages in thread
From: Sergey Yanovich @ 2007-06-18 12:14 UTC (permalink / raw)
  To: git, normalperson, Matthieu.Moy

On 6/18/07, Sergey Yanovich <ynvich@gmail.com> wrote:
> However, '--chain-reply-to' seems to have failed. The patches (2 of
> them) came as top-level posts. Or I may be doing something wrong.

I should have used '--thread' and '--in-reply-to=' when I was formating
the patches. It should be correctied this time.

Sorry for being akward :)

--
 Sergey Yanovich

^ permalink raw reply	[flat|nested] 19+ messages in thread
* [PATCH 3/3] Fix large-scale exports by 'git-svndump'
@ 2007-06-18  7:54 Sergey Yanovich
  0 siblings, 0 replies; 19+ 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] 19+ messages in thread
* git tool to keep a subversion mirror
@ 2007-06-17 18:49 Sergey Yanovich
  2007-06-17 21:09 ` Matthieu Moy
  2007-06-24  7:45 ` git tool to keep a subversion mirror Jan Hudec
  0 siblings, 2 replies; 19+ messages in thread
From: Sergey Yanovich @ 2007-06-17 18:49 UTC (permalink / raw)
  To: git, normalperson


I am actively using git for my project. Thanks everyone envolved.

However, I got tired of administering own web server and registered my
project at sourceforge. Unlike repo.or.cz (thanks again for everyone
envolved), they do not provide git hosting. But a project without a
source repository is non-sence.

I am not in any way going to use Subversion after I tried git, but I
need to be able to export to a Subversion repository. I found an
excellent tool called 'git-svn'. However, the flawed nature of
Subversion put shackles on normal git usage after you do 'git-svn init'.

Since git is the best scm system, my situation is probably quite common.
So I am filing these patches.

There is a 'git-svn' command which does want I need, so I created a
simple wrapper around it. I also found that 'git-svn commit-diff' is
having a small trouble dealing with root <tree-ish>, which is corrected
by an attached patch.

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

end of thread, other threads:[~2007-06-24  7:46 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-18 12:14 git tool to keep a subversion mirror 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   ` Sergey Yanovich
2007-06-19  6:54   ` [PATCH 2/3] 'git-svndump' Sergey Yanovich
2007-06-19  6:54     ` Sergey Yanovich
2007-06-20  6:40     ` Eric Wong
2007-06-20  9:47       ` 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
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
  -- 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-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
2007-06-18 12:14   ` [PATCH 1/3] Accept root <tree-ish> in 'git-svn commit-diff' Sergey Yanovich
2007-06-18 12:14     ` Sergey Yanovich
2007-06-18 13:20       ` Johannes Sixt
2007-06-18 12:14     ` [PATCH 2/3] 'git-svndump' Sergey Yanovich
2007-06-18 12:14       ` Sergey Yanovich
2007-06-18 12:26         ` Charlie Shepherd
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-24  7:45 ` git tool to keep a subversion mirror Jan Hudec

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.