* [BUG] girocco + git-svn: trunk is not propagated to master
@ 2010-02-19 13:22 Kirill Smelkov
2010-02-20 23:42 ` Miklos Vajna
0 siblings, 1 reply; 12+ messages in thread
From: Kirill Smelkov @ 2010-02-19 13:22 UTC (permalink / raw)
To: Petr Baudis; +Cc: Miklos Vajna, git
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [BUG] girocco + git-svn: trunk is not propagated to master
2010-02-19 13:22 [BUG] girocco + git-svn: trunk is not propagated to master Kirill Smelkov
@ 2010-02-20 23:42 ` Miklos Vajna
2010-02-21 17:19 ` Kirill Smelkov
0 siblings, 1 reply; 12+ messages in thread
From: Miklos Vajna @ 2010-02-20 23:42 UTC (permalink / raw)
To: Kirill Smelkov; +Cc: Petr Baudis, git
[-- Attachment #1: Type: text/plain, Size: 1228 bytes --]
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?
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [BUG] girocco + git-svn: trunk is not propagated to master
2010-02-20 23:42 ` Miklos Vajna
@ 2010-02-21 17:19 ` Kirill Smelkov
2010-02-22 8:50 ` [PATCH] Teach Girocco to mirror http:// style SVN repos Kirill Smelkov
0 siblings, 1 reply; 12+ messages in thread
From: Kirill Smelkov @ 2010-02-21 17:19 UTC (permalink / raw)
To: Miklos Vajna, Petr Baudis; +Cc: Kirill Smelkov, git
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
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH] Teach Girocco to mirror http:// style SVN repos
2010-02-21 17:19 ` Kirill Smelkov
@ 2010-02-22 8:50 ` Kirill Smelkov
2010-03-22 11:07 ` [PATCH 0/3] girocco + git-svn: trunk is not propagated to master + more... (resend) Kirill Smelkov
0 siblings, 1 reply; 12+ messages in thread
From: Kirill Smelkov @ 2010-02-22 8:50 UTC (permalink / raw)
To: Petr Baudis; +Cc: Kirill Smelkov, Miklos Vajna, git
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
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 0/3] girocco + git-svn: trunk is not propagated to master + more... (resend)
2010-02-22 8:50 ` [PATCH] Teach Girocco to mirror http:// style SVN repos Kirill Smelkov
@ 2010-03-22 11:07 ` Kirill Smelkov
2010-03-22 11:07 ` [PATCH 1/3] taskd/clone: Don't forget to use 'git config --add' for multivars setup Kirill Smelkov
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Kirill Smelkov @ 2010-03-22 11:07 UTC (permalink / raw)
To: Petr Baudis; +Cc: Miklos Vajna, Petr Baudis, git, Kirill Smelkov
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(-)
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 1/3] taskd/clone: Don't forget to use 'git config --add' for multivars setup
2010-03-22 11:07 ` [PATCH 0/3] girocco + git-svn: trunk is not propagated to master + more... (resend) Kirill Smelkov
@ 2010-03-22 11:07 ` Kirill Smelkov
2010-03-22 11:08 ` [PATCH 2/3] taskd/clone: quote shell metacharacters where appropriate Kirill Smelkov
2010-03-22 11:08 ` [PATCH 3/3] Teach Girocco to mirror http:// style SVN repos Kirill Smelkov
2 siblings, 0 replies; 12+ messages in thread
From: Kirill Smelkov @ 2010-03-22 11:07 UTC (permalink / raw)
To: Petr Baudis; +Cc: Miklos Vajna, Petr Baudis, git, Kirill Smelkov
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
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/3] taskd/clone: quote shell metacharacters where appropriate
2010-03-22 11:07 ` [PATCH 0/3] girocco + git-svn: trunk is not propagated to master + more... (resend) Kirill Smelkov
2010-03-22 11:07 ` [PATCH 1/3] taskd/clone: Don't forget to use 'git config --add' for multivars setup Kirill Smelkov
@ 2010-03-22 11:08 ` Kirill Smelkov
2010-03-22 11:08 ` [PATCH 3/3] Teach Girocco to mirror http:// style SVN repos Kirill Smelkov
2 siblings, 0 replies; 12+ messages in thread
From: Kirill Smelkov @ 2010-03-22 11:08 UTC (permalink / raw)
To: Petr Baudis; +Cc: Miklos Vajna, Petr Baudis, git, Kirill Smelkov
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
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 3/3] Teach Girocco to mirror http:// style SVN repos
2010-03-22 11:07 ` [PATCH 0/3] girocco + git-svn: trunk is not propagated to master + more... (resend) Kirill Smelkov
2010-03-22 11:07 ` [PATCH 1/3] taskd/clone: Don't forget to use 'git config --add' for multivars setup Kirill Smelkov
2010-03-22 11:08 ` [PATCH 2/3] taskd/clone: quote shell metacharacters where appropriate Kirill Smelkov
@ 2010-03-22 11:08 ` Kirill Smelkov
2010-05-05 18:54 ` Petr Baudis
2 siblings, 1 reply; 12+ messages in thread
From: Kirill Smelkov @ 2010-03-22 11:08 UTC (permalink / raw)
To: Petr Baudis; +Cc: Miklos Vajna, Petr Baudis, git, Kirill Smelkov
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
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 3/3] Teach Girocco to mirror http:// style SVN repos
2010-03-22 11:08 ` [PATCH 3/3] Teach Girocco to mirror http:// style SVN repos Kirill Smelkov
@ 2010-05-05 18:54 ` Petr Baudis
2010-05-06 7:18 ` Kirill Smelkov
0 siblings, 1 reply; 12+ messages in thread
From: Petr Baudis @ 2010-05-05 18:54 UTC (permalink / raw)
To: Kirill Smelkov; +Cc: Miklos Vajna, git, Kirill Smelkov, admin
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 3/3] Teach Girocco to mirror http:// style SVN repos
2010-05-05 18:54 ` Petr Baudis
@ 2010-05-06 7:18 ` Kirill Smelkov
2010-05-06 7:36 ` Petr Baudis
0 siblings, 1 reply; 12+ messages in thread
From: Kirill Smelkov @ 2010-05-06 7:18 UTC (permalink / raw)
To: admin, Petr Baudis; +Cc: Miklos Vajna, git, Kirill Smelkov
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
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 3/3] Teach Girocco to mirror http:// style SVN repos
2010-05-06 7:18 ` Kirill Smelkov
@ 2010-05-06 7:36 ` Petr Baudis
2010-05-06 8:32 ` Kirill Smelkov
0 siblings, 1 reply; 12+ messages in thread
From: Petr Baudis @ 2010-05-06 7:36 UTC (permalink / raw)
To: Kirill Smelkov; +Cc: admin, Miklos Vajna, git, Kirill Smelkov
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 3/3] Teach Girocco to mirror http:// style SVN repos
2010-05-06 7:36 ` Petr Baudis
@ 2010-05-06 8:32 ` Kirill Smelkov
0 siblings, 0 replies; 12+ messages in thread
From: Kirill Smelkov @ 2010-05-06 8:32 UTC (permalink / raw)
To: Petr Baudis; +Cc: admin, Miklos Vajna, git, Kirill Smelkov
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!
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2010-05-06 8:30 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-19 13:22 [BUG] girocco + git-svn: trunk is not propagated to master Kirill Smelkov
2010-02-20 23:42 ` Miklos Vajna
2010-02-21 17:19 ` Kirill Smelkov
2010-02-22 8:50 ` [PATCH] Teach Girocco to mirror http:// style SVN repos Kirill Smelkov
2010-03-22 11:07 ` [PATCH 0/3] girocco + git-svn: trunk is not propagated to master + more... (resend) Kirill Smelkov
2010-03-22 11:07 ` [PATCH 1/3] taskd/clone: Don't forget to use 'git config --add' for multivars setup Kirill Smelkov
2010-03-22 11:08 ` [PATCH 2/3] taskd/clone: quote shell metacharacters where appropriate Kirill Smelkov
2010-03-22 11:08 ` [PATCH 3/3] Teach Girocco to mirror http:// style SVN repos Kirill Smelkov
2010-05-05 18:54 ` Petr Baudis
2010-05-06 7:18 ` Kirill Smelkov
2010-05-06 7:36 ` Petr Baudis
2010-05-06 8:32 ` Kirill Smelkov
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).