externals do not work with svn+ssh urls

Create issue
Issue #192 resolved
cpricethetus created an issue


A lot of my company's svn url's use the "svn+ssh://" protocol. When I was trying to set up some svnexternals to pull things from repositories that use that URL prefix, I was getting errors. Poking into the code in svnexternals.py, I found the "re_defnew" and "re_scheme" regular expressions, which are expecting only a-z or A-Z to prefix the "://" in the URL. A simple change to these regexes to allow a "+" in those prefixes solved the problem for me, and the externals are working fine with svn+ssh now. My updated lines:

{{{ #!python

re_defnew = re.compile(r'^(?:-r\s(\d+)\s+)?((?:[a-z+A-Z]+://|\^/).)\s+(.*)$') re_scheme = re.compile(r'^[a-z+A-Z]+://') }}}

Would love to see this small change added to the main source so that I can recommend hgsubversion to some of my co-workers w/o them having to edit the code when they pull it down.


Comments (5)

  1. Augie Fackler repo owner

    (Reply via dur...@gmail.com):

    Can I persuade you to send an 'hg export'ed patch to the hgsubversion google group? That way it's easier to credit you.

  2. Former user Account Deleted

    It still cannot work after I applying the patch to my working directory of hgsubversion.

  3. Former user Account Deleted

    I added following setting to the file mercurials.ini

    ssh = "TortoisePlink.exe" -i "C:\Documents and Settings\York\svn\Private.txt"

    I also applied the patch to the working directory of hgsubversion.

    But it still cannot work.

    If anyone can give me suggestions. Thanks

  4. Log in to comment