# [BUG] girocco + git-svn: trunk is not propagated to master

12 messages from 2010-02-19 to 2010-05-06. Participants: Kirill Smelkov, Miklos Vajna, Petr Baudis.
Thread: https://gitlist.dev/t/22725

## Kirill Smelkov, 2010-02-19 13:22

Subject: [BUG] girocco + git-svn: trunk is not propagated to master
Message-ID: <20100219132206.GA13734@tugrik.mns.mnsspb.ru>
URL: https://gitlist.dev/e/20100219132206.GA13734%40tugrik.mns.mnsspb.ru

```
Hello Petr, Miklos, All,

Recently I've setup an svn mirror on repo.or.cz for docutils projects[1].
Automatic regular updates by `git svn fetch` seem to work, so first
thanks for the service.

However master is not updated at all, and also refs/heads/* are not
populated from refs/remotes/* it seems.

In Girocco's taskd/clone.sh[2] and jobd/update.sh[3], I see there is a
nice setup for master to be bound to trunk and also refs/remotes/heads/*
to be propagates to refs/remotes/*:

---- taskd/clone.sh ----
svn://*)
    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 remote.origin.fetch +refs/remotes/trunk:refs/heads/master
    GIT_DIR=. git config remote.origin.fetch +refs/remotes/tags/*:refs/tags/*
    GIT_DIR=. git fetch

---- jobd/update.sh ----
svn://*)
        GIT_DIR=. bang git svn fetch
        GIT_DIR=. bang git fetch


But it seems it does not work. First I see there is a need for quoting,
so e.g. 

-   GIT_DIR=. git config remote.origin.fetch +refs/remotes/heads/*:refs/heads/*
+   GIT_DIR=. git config remote.origin.fetch '+refs/remotes/heads/*:refs/heads/*'

but I'm not sure it will fix the problem.

Can we do something about it please?


Thanks beforehand,
Kirill


[1] http://repo.or.cz/w/docutils.git
[2] http://repo.or.cz/w/girocco.git/blob/HEAD:/taskd/clone.sh#l25
[3] http://repo.or.cz/w/girocco.git/blob/HEAD:/jobd/update.sh#l41

```

## Miklos Vajna, 2010-02-20 23:42

Subject: Re: [BUG] girocco + git-svn: trunk is not propagated to master
Message-ID: <20100220234200.GS12429@genesis.frugalware.org>
URL: https://gitlist.dev/e/20100220234200.GS12429%40genesis.frugalware.org
In-Reply-To: <20100219132206.GA13734@tugrik.mns.mnsspb.ru>

```
On Fri, Feb 19, 2010 at 04:22:07PM +0300, Kirill Smelkov <kirr@mns.spb.ru> wrote:
> ---- taskd/clone.sh ----
> svn://*)
>     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 remote.origin.fetch +refs/remotes/trunk:refs/heads/master
>     GIT_DIR=. git config remote.origin.fetch +refs/remotes/tags/*:refs/tags/*
>     GIT_DIR=. git fetch

Here is the original blog post:

http://vmiklos.hu/blog/svn-ggit-conversion-using-git-svn

> ---- jobd/update.sh ----
> svn://*)
>         GIT_DIR=. bang git svn fetch
>         GIT_DIR=. bang git fetch
> 
> 
> But it seems it does not work. First I see there is a need for quoting,
> so e.g. 
> 
> -   GIT_DIR=. git config remote.origin.fetch +refs/remotes/heads/*:refs/heads/*
> +   GIT_DIR=. git config remote.origin.fetch '+refs/remotes/heads/*:refs/heads/*'
> 
> but I'm not sure it will fix the problem.

When I tried this technique in ooo-build, I did not need quoting. Though
it won't hurt, sure.

> Can we do something about it please?

Did you get any error message?

```

## Kirill Smelkov, 2010-02-21 17:19

Subject: Re: [BUG] girocco + git-svn: trunk is not propagated to master
Message-ID: <20100221171939.GA10166@landau.phys.spbu.ru>
URL: https://gitlist.dev/e/20100221171939.GA10166%40landau.phys.spbu.ru
In-Reply-To: <20100220234200.GS12429@genesis.frugalware.org>

```
On Sun, Feb 21, 2010 at 12:42:00AM +0100, Miklos Vajna wrote:
> On Fri, Feb 19, 2010 at 04:22:07PM +0300, Kirill Smelkov <kirr@mns.spb.ru> wrote:
> > ---- taskd/clone.sh ----
> > svn://*)
> >     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 remote.origin.fetch +refs/remotes/trunk:refs/heads/master
> >     GIT_DIR=. git config remote.origin.fetch +refs/remotes/tags/*:refs/tags/*
> >     GIT_DIR=. git fetch
> 
> Here is the original blog post:
> 
> http://vmiklos.hu/blog/svn-ggit-conversion-using-git-svn

Thanks

> > ---- jobd/update.sh ----
> > svn://*)
> >         GIT_DIR=. bang git svn fetch
> >         GIT_DIR=. bang git fetch
> > 
> > 
> > But it seems it does not work. First I see there is a need for quoting,
> > so e.g. 
> > 
> > -   GIT_DIR=. git config remote.origin.fetch +refs/remotes/heads/*:refs/heads/*
> > +   GIT_DIR=. git config remote.origin.fetch '+refs/remotes/heads/*:refs/heads/*'
> > 
> > but I'm not sure it will fix the problem.
> 
> When I tried this technique in ooo-build, I did not need quoting. Though
> it won't hurt, sure.

Yes it should work as is, but quoting wildcards is defensive. Just in
case.

> > Can we do something about it please?
> 
> Did you get any error message?

No, it sent me an email that cloning was ok and that was it...


... I think I've found the problem -- it's that we need to use
`git config --add` in order to setup multivars. Please find patches below.
Petr, if everything is ok with them, could you please apply it? Thanks.


From fd625c71d1f6ec88bd58faaca24da29c1fb8b5b3 Mon Sep 17 00:00:00 2001
From: Kirill Smelkov <kirr@mns.spb.ru>
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 962c526..0f5d6fa 100755
--- a/taskd/clone.sh
+++ b/taskd/clone.sh
@@ -28,8 +28,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.0.50.g50c1



From 79477bd2cdc60574eb4a07d2dc2c97d9fa663e27 Mon Sep 17 00:00:00 2001
From: Kirill Smelkov <kirr@mns.spb.ru>
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 0f5d6fa..cfcb3b1 100755
--- a/taskd/clone.sh
+++ b/taskd/clone.sh
@@ -27,9 +27,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.0.50.g50c1


```

## Kirill Smelkov, 2010-02-22 08:50

Subject: [PATCH] Teach Girocco to mirror http:// style SVN repos
Message-ID: <20100222085029.GA28744@landau.phys.spbu.ru>
URL: https://gitlist.dev/e/20100222085029.GA28744%40landau.phys.spbu.ru
In-Reply-To: <20100221171939.GA10166@landau.phys.spbu.ru>

```
On Sun, Feb 21, 2010 at 08:19:39PM +0300, Kirill Smelkov wrote:
> ... I think I've found the problem -- it's that we need to use
> `git config --add` in order to setup multivars. Please find patches below.
> Petr, if everything is ok with them, could you please apply it? Thanks.

And also, while at it, I was always dreaming about http:// style svn
mirroring support at repo.or.cz . Petr, they say dreams always come
true. Could you please apply it?


>From 7cb7218b23c7ab89609a812137e1d621603aabc6 Mon Sep 17 00:00:00 2001
From: Kirill Smelkov <kirr@mns.spb.ru>
Date: Mon, 22 Feb 2010 11:37:35 +0300
Subject: [PATCH] Teach Girocco to mirror http:// style SVN repos

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.
---
 Girocco/Util.pm |    2 +-
 jobd/update.sh  |    2 +-
 taskd/clone.sh  |    6 ++++--
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/Girocco/Util.pm b/Girocco/Util.pm
index e2f7854..969cb3c 100644
--- a/Girocco/Util.pm
+++ b/Girocco/Util.pm
@@ -111,7 +111,7 @@ sub valid_web_url {
 }
 sub valid_repo_url {
 	$_ = $_[0];
-	/^(http|git|svn|darcs|bzr):\/\/[a-zA-Z0-9-.:]+(\/[_\%a-zA-Z0-9.\/~-]*)?$/;
+	/^(http|git|svn(\+http)?|darcs|bzr):\/\/[a-zA-Z0-9-.:]+(\/[_\%a-zA-Z0-9.\/~-]*)?$/;
 }
 
 
diff --git a/jobd/update.sh b/jobd/update.sh
index e09ef95..65e0455 100755
--- a/jobd/update.sh
+++ b/jobd/update.sh
@@ -38,7 +38,7 @@ mail="$(config_get owner)"
 bang git for-each-ref --format '%(refname)	%(objectname)' >.refs-before
 
 case "$url" in
-	svn://*)
+	svn://* | svn+http://*)
 		GIT_DIR=. bang git svn fetch
 		GIT_DIR=. bang git fetch
 		;;
diff --git a/taskd/clone.sh b/taskd/clone.sh
index cfcb3b1..e634388 100755
--- a/taskd/clone.sh
+++ b/taskd/clone.sh
@@ -22,8 +22,10 @@ mail="$(config_get owner)"
 # Initial mirror
 echo "Initiating mirroring..."
 case "$url" in
-	svn://*)
-		GIT_DIR=. git svn init -s "$url"
+	svn://* | svn+http://*)
+		# we just remote svn+ here, so svn+http://... becomes http://...
+		svnurl="${url#svn+}"
+		GIT_DIR=. git svn init -s "$svnurl"
 		GIT_DIR=. git svn fetch
 		# Neat Trick suggested by Miklos Vajna
 		GIT_DIR=. git config remote.origin.url .
-- 
1.7.0.50.g50c1

```

## Kirill Smelkov, 2010-03-22 11:07

Subject: [PATCH 0/3] girocco + git-svn: trunk is not propagated to master + more... (resend)
Message-ID: <cover.1269255835.git.kirr@mns.spb.ru>
URL: https://gitlist.dev/e/cover.1269255835.git.kirr%40mns.spb.ru
In-Reply-To: <20100222085029.GA28744@landau.phys.spbu.ru>

```
On Mon, Feb 22, 2010 at 11:50:29AM +0300, Kirill Smelkov wrote:
> On Sun, Feb 21, 2010 at 08:19:39PM +0300, Kirill Smelkov wrote:
> > ... I think I've found the problem -- it's that we need to use
> > `git config --add` in order to setup multivars. Please find patches below.
> > Petr, if everything is ok with them, could you please apply it? Thanks.
>
> And also, while at it, I was always dreaming about http:// style svn
> mirroring support at repo.or.cz . Petr, they say dreams always come
> true. Could you please apply it?

Petr,

Since I was once recognized as russian spam in Junio's inbox, and it's
already one month since I originally posted, I'd like
to "resend" this stuff. Could you please ACK/NAK?

Thanks beforehand,
Kirill


http://marc.info/?l=git&m=126677421607801&w=2
http://marc.info/?l=git&m=126682864619850&w=2


Kirill Smelkov (3):
  taskd/clone: Don't forget to use 'git config --add' for multivars
    setup
  taskd/clone: quote shell metacharacters where appropriate
  Teach Girocco to mirror http:// style SVN repos

 Girocco/Util.pm |    2 +-
 jobd/update.sh  |    2 +-
 taskd/clone.sh  |   12 +++++++-----
 3 files changed, 9 insertions(+), 7 deletions(-)

```

## Kirill Smelkov, 2010-03-22 11:07

Subject: [PATCH 1/3] taskd/clone: Don't forget to use 'git config --add' for multivars setup
Message-ID: <9e5d5b9ade49b4b2aa14f67d337961a73b35ae33.1269255835.git.kirr@mns.spb.ru>
URL: https://gitlist.dev/e/9e5d5b9ade49b4b2aa14f67d337961a73b35ae33.1269255835.git.kirr%40mns.spb.ru
In-Reply-To: <20100222085029.GA28744@landau.phys.spbu.ru>

```
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 962c526..0f5d6fa 100755
--- a/taskd/clone.sh
+++ b/taskd/clone.sh
@@ -28,8 +28,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.0.2.284.gafe27d

```

## Kirill Smelkov, 2010-03-22 11:08

Subject: [PATCH 2/3] taskd/clone: quote shell metacharacters where appropriate
Message-ID: <31fb9f4ece8be1e91aca8f05e78a8e3df986741d.1269255835.git.kirr@mns.spb.ru>
URL: https://gitlist.dev/e/31fb9f4ece8be1e91aca8f05e78a8e3df986741d.1269255835.git.kirr%40mns.spb.ru
In-Reply-To: <20100222085029.GA28744@landau.phys.spbu.ru>

```
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 0f5d6fa..cfcb3b1 100755
--- a/taskd/clone.sh
+++ b/taskd/clone.sh
@@ -27,9 +27,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.0.2.284.gafe27d

```

## Kirill Smelkov, 2010-03-22 11:08

Subject: [PATCH 3/3] Teach Girocco to mirror http:// style SVN repos
Message-ID: <b7d25a4325c26bed2351257521878109b71ad771.1269255835.git.kirr@mns.spb.ru>
URL: https://gitlist.dev/e/b7d25a4325c26bed2351257521878109b71ad771.1269255835.git.kirr%40mns.spb.ru
In-Reply-To: <20100222085029.GA28744@landau.phys.spbu.ru>

```
From: Kirill Smelkov <kirr@landau.phys.spbu.ru>

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.
---
 Girocco/Util.pm |    2 +-
 jobd/update.sh  |    2 +-
 taskd/clone.sh  |    6 ++++--
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/Girocco/Util.pm b/Girocco/Util.pm
index e2f7854..969cb3c 100644
--- a/Girocco/Util.pm
+++ b/Girocco/Util.pm
@@ -111,7 +111,7 @@ sub valid_web_url {
 }
 sub valid_repo_url {
 	$_ = $_[0];
-	/^(http|git|svn|darcs|bzr):\/\/[a-zA-Z0-9-.:]+(\/[_\%a-zA-Z0-9.\/~-]*)?$/;
+	/^(http|git|svn(\+http)?|darcs|bzr):\/\/[a-zA-Z0-9-.:]+(\/[_\%a-zA-Z0-9.\/~-]*)?$/;
 }
 
 
diff --git a/jobd/update.sh b/jobd/update.sh
index e09ef95..65e0455 100755
--- a/jobd/update.sh
+++ b/jobd/update.sh
@@ -38,7 +38,7 @@ mail="$(config_get owner)"
 bang git for-each-ref --format '%(refname)	%(objectname)' >.refs-before
 
 case "$url" in
-	svn://*)
+	svn://* | svn+http://*)
 		GIT_DIR=. bang git svn fetch
 		GIT_DIR=. bang git fetch
 		;;
diff --git a/taskd/clone.sh b/taskd/clone.sh
index cfcb3b1..e634388 100755
--- a/taskd/clone.sh
+++ b/taskd/clone.sh
@@ -22,8 +22,10 @@ mail="$(config_get owner)"
 # Initial mirror
 echo "Initiating mirroring..."
 case "$url" in
-	svn://*)
-		GIT_DIR=. git svn init -s "$url"
+	svn://* | svn+http://*)
+		# we just remote svn+ here, so svn+http://... becomes http://...
+		svnurl="${url#svn+}"
+		GIT_DIR=. git svn init -s "$svnurl"
 		GIT_DIR=. git svn fetch
 		# Neat Trick suggested by Miklos Vajna
 		GIT_DIR=. git config remote.origin.url .
-- 
1.7.0.2.284.gafe27d

```

## Petr Baudis, 2010-05-05 18:54

Subject: Re: [PATCH 3/3] Teach Girocco to mirror http:// style SVN repos
Message-ID: <20100505185409.GV11185@machine.or.cz>
URL: https://gitlist.dev/e/20100505185409.GV11185%40machine.or.cz
In-Reply-To: <b7d25a4325c26bed2351257521878109b71ad771.1269255835.git.kirr@mns.spb.ru>

```
On Mon, Mar 22, 2010 at 02:08:01PM +0300, Kirill Smelkov wrote:
> From: Kirill Smelkov <kirr@landau.phys.spbu.ru>
> 
> 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@repo.or.cz
instead. 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.)

-- 
				Petr "Pasky" Baudis
When I feel like exercising, I just lie down until the feeling
goes away.  -- xed_over

```

## Kirill Smelkov, 2010-05-06 07:18

Subject: Re: [PATCH 3/3] Teach Girocco to mirror http:// style SVN repos
Message-ID: <20100506071842.GA3436@tugrik.mns.mnsspb.ru>
URL: https://gitlist.dev/e/20100506071842.GA3436%40tugrik.mns.mnsspb.ru
In-Reply-To: <20100505185409.GV11185@machine.or.cz>

```
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@landau.phys.spbu.ru>
> > 
> > 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@repo.or.cz
> 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@mns.spb.ru>
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@mns.spb.ru>
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

```

## Petr Baudis, 2010-05-06 07:36

Subject: Re: [PATCH 3/3] Teach Girocco to mirror http:// style SVN repos
Message-ID: <20100506073647.GS11185@machine.or.cz>
URL: https://gitlist.dev/e/20100506073647.GS11185%40machine.or.cz
In-Reply-To: <20100506071842.GA3436@tugrik.mns.mnsspb.ru>

```
On Thu, May 06, 2010 at 11:18:42AM +0400, Kirill Smelkov wrote:
> Btw, would you please also apply those two important (one of them) fixes
> to svn mirroring setup?
> 
> *Please*

Applied, thanks.

-- 
				Petr "Pasky" Baudis
When I feel like exercising, I just lie down until the feeling
goes away.  -- xed_over

```

## Kirill Smelkov, 2010-05-06 08:32

Subject: Re: [PATCH 3/3] Teach Girocco to mirror http:// style SVN repos
Message-ID: <20100506083204.GA5247@tugrik.mns.mnsspb.ru>
URL: https://gitlist.dev/e/20100506083204.GA5247%40tugrik.mns.mnsspb.ru
In-Reply-To: <20100506073647.GS11185@machine.or.cz>

```
On Thu, May 06, 2010 at 09:36:47AM +0200, Petr Baudis wrote:
> On Thu, May 06, 2010 at 11:18:42AM +0400, Kirill Smelkov wrote:
> > Btw, would you please also apply those two important (one of them) fixes
> > to svn mirroring setup?
> > 
> > *Please*
> 
> Applied, thanks.

Thanks!

```
