hg: have peer() call _lookup directly
authorMatt Mackall <mpm@selenic.com>
Fri, 10 Jun 2011 11:43:38 -0500
changeset 14555 1ceb2cf9f9d9
parent 14554 68db17047637
child 14556 517e1d88bf7e
hg: have peer() call _lookup directly Note that this means that peers no longer call the extension repository setup hooks.
mercurial/hg.py
--- a/mercurial/hg.py	Fri Jun 10 11:43:38 2011 -0500
+++ b/mercurial/hg.py	Fri Jun 10 11:43:38 2011 -0500
@@ -101,7 +101,7 @@
 def peer(ui, opts, path, create=False):
     '''return a repository peer for the specified path'''
     rui = remoteui(ui, opts)
-    return repository(rui, path, create)
+    return _lookup(path).instance(rui, path, create)
 
 def defaultdest(source):
     '''return default destination of clone if none is given'''