diff mercurial/hg.py @ 20860:81d6dc8c3c63

merge with stable This should correct an earlier couple of bad merges (5433856b2558 and 596960a4ad0d, now pruned) that accidentally brought in a change that had been marked obsolete (244ac996a821).
author Kevin Bullock <kbullock@ringworld.org>
date Mon, 31 Mar 2014 10:12:07 -0500
parents 9a09a625bc93 bc56ec9e64df
children 6500a2eebee8
line wrap: on
line diff
--- 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):