--- 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):