git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Kirill Smelkov <kirr@landau.phys.spbu.ru>
Date
Feb 22, 2010, 08:50 UTC
Message-ID
<20100222085029.GA28744@landau.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
Previous: Kirill SmelkovNext: Kirill Smelkov
Message 4 of 12 in “[BUG] girocco + git-svn: trunk is not propagated to master”
  1. Kirill SmelkovFeb 19, 2010
  2. Miklos VajnaFeb 20, 2010
  3. Kirill SmelkovFeb 21, 2010
  4. Teach Girocco to mirror http:// style SVN reposKirill Smelkov, Feb 22, 2010
  5. 0/3 girocco + git-svn: trunk is not propagated to master + more... (resend)Kirill Smelkov, Mar 22, 2010
  6. 1/3 taskd/clone: Don't forget to use 'git config --add' for multivars setupKirill Smelkov, Mar 22, 2010
  7. 2/3 taskd/clone: quote shell metacharacters where appropriateKirill Smelkov, Mar 22, 2010
  8. 3/3 Teach Girocco to mirror http:// style SVN reposKirill Smelkov, Mar 22, 2010
  9. Petr BaudisMay 5, 2010
  10. Kirill SmelkovMay 6, 2010
  11. Petr BaudisMay 6, 2010
  12. Kirill SmelkovMay 6, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.