changeset 851:9ce00cb1d676

Merge alternate tunnel schemes.
author Augie Fackler <durin42@gmail.com>
date Sat, 25 Feb 2012 14:51:22 -0600
parents d3bc067c0f72 (diff) 4e203a47102a (current diff)
children 8a226f0f99aa
files hgsubversion/svnexternals.py
diffstat 2 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/__init__.py
+++ b/hgsubversion/__init__.py
@@ -177,6 +177,8 @@ def extsetup():
 def reposetup(ui, repo):
     if repo.local():
         svnrepo.generate_repo_class(ui, repo)
+        for tunnel in ui.configlist('hgsubversion', 'tunnels'):
+            hg.schemes['svn+' + tunnel] = svnrepo
 
 _old_local = hg.schemes['file']
 def _lookup(url):
--- a/hgsubversion/svnexternals.py
+++ b/hgsubversion/svnexternals.py
@@ -95,9 +95,9 @@ def diff(ext1, ext2):
 class BadDefinition(Exception):
     pass
 
-re_defold = re.compile(r'^\s*(.*?)\s+(?:-r\s*(\d+|\{REV\})\s+)?([a-zA-Z]+://.*)\s*$')
-re_defnew = re.compile(r'^\s*(?:-r\s*(\d+|\{REV\})\s+)?((?:[a-zA-Z]+://|\^/).*)\s+(\S+)\s*$')
-re_scheme = re.compile(r'^[a-zA-Z]+://')
+re_defold = re.compile(r'^\s*(.*?)\s+(?:-r\s*(\d+|\{REV\})\s+)?([a-zA-Z+]+://.*)\s*$')
+re_defnew = re.compile(r'^\s*(?:-r\s*(\d+|\{REV\})\s+)?((?:[a-zA-Z+]+://|\^/).*)\s+(\S+)\s*$')
+re_scheme = re.compile(r'^[a-zA-Z+]+://')
 
 def parsedefinition(line):
     """Parse an external definition line, return a tuple (path, rev, source)