mercurial/hg.py
branchstable
changeset 20858 bc56ec9e64df
parent 20825 dda11e799529
child 20868 5db105f216c3
child 20860 81d6dc8c3c63
--- a/mercurial/hg.py	Thu Mar 27 17:21:27 2014 -0500
+++ b/mercurial/hg.py	Sat Mar 29 01:20:07 2014 +0900
@@ -98,6 +98,9 @@
     else:
         return url.open(ui, path)
 
+# a list of (ui, repo) functions called for wire peer initialization
+wirepeersetupfuncs = []
+
 def _peerorrepo(ui, path, create=False):
     """return a repository object for the specified path"""
     obj = _peerlookup(path).instance(ui, path, create)
@@ -106,6 +109,9 @@
         hook = getattr(module, 'reposetup', None)
         if hook:
             hook(ui, obj)
+    if not obj.local():
+        for f in wirepeersetupfuncs:
+            f(ui, obj)
     return obj
 
 def repository(ui, path='', create=False):