##// END OF EJS Templates
zeroconf: fix crash in "hg paths" when zeroconf server is up...
Danek Duvall -
r28250:6d0d1173 default
parent child Browse files
Show More
@@ -169,6 +169,16 b' def configitems(orig, self, section, *ar'
169 repos += getzcpaths()
169 repos += getzcpaths()
170 return repos
170 return repos
171
171
172 def configsuboptions(orig, self, section, name, *args, **kwargs):
173 opt, sub = orig(self, section, name, *args, **kwargs)
174 if section == "paths" and name.startswith("zc-"):
175 # We have to find the URL in the zeroconf paths. We can't cons up any
176 # suboptions, so we use any that we found in the original config.
177 for zcname, zcurl in getzcpaths():
178 if zcname == name:
179 return zcurl, sub
180 return opt, sub
181
172 def defaultdest(orig, source):
182 def defaultdest(orig, source):
173 for name, path in getzcpaths():
183 for name, path in getzcpaths():
174 if path == source:
184 if path == source:
@@ -189,5 +199,6 b" extensions.wrapfunction(dispatch, '_runc"
189
199
190 extensions.wrapfunction(ui.ui, 'config', config)
200 extensions.wrapfunction(ui.ui, 'config', config)
191 extensions.wrapfunction(ui.ui, 'configitems', configitems)
201 extensions.wrapfunction(ui.ui, 'configitems', configitems)
202 extensions.wrapfunction(ui.ui, 'configsuboptions', configsuboptions)
192 extensions.wrapfunction(hg, 'defaultdest', defaultdest)
203 extensions.wrapfunction(hg, 'defaultdest', defaultdest)
193 extensions.wrapfunction(servermod, 'create_server', zc_create_server)
204 extensions.wrapfunction(servermod, 'create_server', zc_create_server)
General Comments 0
You need to be logged in to leave comments. Login now