diff hgext/schemes.py @ 14568:5f002e3336ba

hg: split peer and repo lookup tables
author Matt Mackall <mpm@selenic.com>
date Sat, 11 Jun 2011 14:14:52 -0500
parents 924c82157d46
children 9f1139cf5c76
line wrap: on
line diff
--- a/hgext/schemes.py	Sat Jun 11 14:40:25 2011 +0200
+++ b/hgext/schemes.py	Sat Jun 11 14:14:52 2011 -0500
@@ -69,7 +69,7 @@
             tail = ''
         context = dict((str(i + 1), v) for i, v in enumerate(parts))
         url = ''.join(self.templater.process(self.url, context)) + tail
-        return hg._lookup(url).instance(ui, url, create)
+        return hg._peerlookup(url).instance(ui, url, create)
 
 def hasdriveletter(orig, path):
     for scheme in schemes:
@@ -93,6 +93,6 @@
             and os.path.exists('%s:\\' % scheme)):
             raise util.Abort(_('custom scheme %s:// conflicts with drive '
                                'letter %s:\\\n') % (scheme, scheme.upper()))
-        hg.schemes[scheme] = ShortRepository(url, scheme, t)
+        hg._peerschemes[scheme] = ShortRepository(url, scheme, t)
 
     extensions.wrapfunction(util, 'hasdriveletter', hasdriveletter)