mercurial/hg.py
changeset 20860 81d6dc8c3c63
parent 20829 9a09a625bc93
parent 20858 bc56ec9e64df
child 20870 6500a2eebee8
--- a/mercurial/hg.py	Tue Mar 18 14:29:33 2014 -0700
+++ b/mercurial/hg.py	Mon Mar 31 10:12:07 2014 -0500
@@ -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):