Re: [PATCH 3/3] Teach Girocco to mirror http:// style SVN repos

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 05, 2010 at 08:54:09PM +0200, Petr Baudis wrote:
> On Mon, Mar 22, 2010 at 02:08:01PM +0300, Kirill Smelkov wrote:
> > From: Kirill Smelkov <kirr@xxxxxxxxxxxxxxxxxxx>
> > 
> > Currently we can mirror svn:// repos, but http:// is assumed to be used
> > for Git. Teach the tool to use svn+http:// style urls for http:// svn
> > repositories.
> > 
> > This is very needed, because most SVN hosting services only provide
> > http:// style access to their services. e.g. google code, python.org,
> > etc...
> > 
> > This has not been tested on full Girocco installation - just partly. But
> > if it works, let's also add svn+https later.
> 
> Thanks, applied.
> 
> (BTW, it would be much better if you sent patches to admin@xxxxxxxxxx
> instead.

I see, and thanks for applying this one finally.

Btw, would you please also apply those two important (one of them) fixes
to svn mirroring setup?

*Please*


>From bdb55d014374c0f594ab70d7b22617fc61201d81 Mon Sep 17 00:00:00 2001
From: Kirill Smelkov <kirr@xxxxxxxxxx>
Date: Sun, 21 Feb 2010 20:02:00 +0300
Subject: [PATCH 1/2] taskd/clone: Don't forget to use 'git config --add' for multivars setup

Neat Trick suggested by Miklos Vajna setups origin remote as '.' and
also setups 3 refspecs for remotes.origin.fetch.

The trick is nice indeed, but in order to setup config multivar, one
have to use explicit --add option for `git config' (*) or else old var
value is just replaced.

The problem showed in svn-mirror repositories with stale master (was not
updating from trunk) and also as lack of branches -- that's
understandable -- we had '+refs/remotes/tags/*:refs/tags/*' config last,
and tags were working OK.

Fix it.

(*) explicit --add was needed since 89c4afe0 (Add --add option to
    git-repo-config) in git.git, which dates to git v1.4.4.2-225-g89c4afe
---
 taskd/clone.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/taskd/clone.sh b/taskd/clone.sh
index f99d046..270626c 100755
--- a/taskd/clone.sh
+++ b/taskd/clone.sh
@@ -30,8 +30,8 @@ case "$url" in
 		# Neat Trick suggested by Miklos Vajna
 		GIT_DIR=. git config remote.origin.url .
 		GIT_DIR=. git config remote.origin.fetch +refs/remotes/heads/*:refs/heads/*
-		GIT_DIR=. git config remote.origin.fetch +refs/remotes/trunk:refs/heads/master
-		GIT_DIR=. git config remote.origin.fetch +refs/remotes/tags/*:refs/tags/*
+		GIT_DIR=. git config --add remote.origin.fetch +refs/remotes/trunk:refs/heads/master
+		GIT_DIR=. git config --add remote.origin.fetch +refs/remotes/tags/*:refs/tags/*
 		GIT_DIR=. git fetch
 		;;
 	darcs://*)
-- 
1.7.1.16.g5dc5



>From 0db9ccc033ac6b82ff3026fa89846616a9b74f9e Mon Sep 17 00:00:00 2001
From: Kirill Smelkov <kirr@xxxxxxxxxx>
Date: Sun, 21 Feb 2010 20:11:09 +0300
Subject: [PATCH 2/2] taskd/clone: quote shell metacharacters where appropriate

At present this involves svn mirror setup -- refspec mappings contain
shell wildcards. Quote them just in case.
---
 taskd/clone.sh |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/taskd/clone.sh b/taskd/clone.sh
index 270626c..e634388 100755
--- a/taskd/clone.sh
+++ b/taskd/clone.sh
@@ -29,9 +29,9 @@ case "$url" in
 		GIT_DIR=. git svn fetch
 		# Neat Trick suggested by Miklos Vajna
 		GIT_DIR=. git config remote.origin.url .
-		GIT_DIR=. git config remote.origin.fetch +refs/remotes/heads/*:refs/heads/*
-		GIT_DIR=. git config --add remote.origin.fetch +refs/remotes/trunk:refs/heads/master
-		GIT_DIR=. git config --add remote.origin.fetch +refs/remotes/tags/*:refs/tags/*
+		GIT_DIR=. git config remote.origin.fetch '+refs/remotes/heads/*:refs/heads/*'
+		GIT_DIR=. git config --add remote.origin.fetch '+refs/remotes/trunk:refs/heads/master'
+		GIT_DIR=. git config --add remote.origin.fetch '+refs/remotes/tags/*:refs/tags/*'
 		GIT_DIR=. git fetch
 		;;
 	darcs://*)
-- 
1.7.1.16.g5dc5




> At least in theory - if anyone is interested helping out with
> various rather badly needed repo.or.cz tasks
> [http://repo.or.cz/w/girocco.git/blob/rorcz:/TODO], please let me know
> and I will give you some admin permissions.)

Thanks for the offer. Unfortunately I can't commit to this task :(


Thanks,
Kirill
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]