diff --git a/hgext/schemes.py b/hgext/schemes.py --- a/hgext/schemes.py +++ b/hgext/schemes.py @@ -65,6 +65,10 @@ class ShortRepository(object): return '' % self.scheme def instance(self, ui, url, create): + url = self.resolve(url) + return hg._peerlookup(url).instance(ui, url, create) + + def resolve(self, url): # Should this use the util.url class, or is manual parsing better? try: url = url.split('://', 1)[1] @@ -77,8 +81,7 @@ class ShortRepository(object): else: tail = '' context = dict((str(i + 1), v) for i, v in enumerate(parts)) - url = ''.join(self.templater.process(self.url, context)) + tail - return hg._peerlookup(url).instance(ui, url, create) + return ''.join(self.templater.process(self.url, context)) + tail def hasdriveletter(orig, path): if path: