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