changeset 1586:6cc986fee28e

The Mercurial 4.5 that comes with Ubuntu doesn't have this parameter
author Bernhard F.W. Gschaider <bgschaid@hfd-research.com>
date Fri, 21 Sep 2018 15:07:09 +0200
parents e15dc9e9cd56
children 4889843a704e
files hgsubversion/svnrepo.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/svnrepo.py
+++ b/hgsubversion/svnrepo.py
@@ -248,7 +248,10 @@ def instance(ui, url, create, intents=No
     if url.startswith('http://') or url.startswith('https://'):
         try:
             # may yield a bogus 'real URL...' message
-            return httppeer.instance(ui, url, create, intents=intents)
+            try:
+                return httppeer.instance(ui, url, create, intents=intents)
+            except TypeError:
+                return httppeer.instance(ui, url, create)   # old mercurial versions don'T have that parameter
         except error.RepoError:
             ui.traceback()
             ui.note('(falling back to Subversion support)\n')