Show More
@@ -24,7 +24,7 b' You can discover zeroconf enabled reposi' | |||
|
24 | 24 | ''' |
|
25 | 25 | |
|
26 | 26 | import Zeroconf, socket, time, os |
|
27 | from mercurial import ui | |
|
27 | from mercurial import ui, hg, encoding | |
|
28 | 28 | from mercurial import extensions |
|
29 | 29 | from mercurial.hgweb import hgweb_mod |
|
30 | 30 | from mercurial.hgweb import hgwebdir_mod |
@@ -156,7 +156,14 b' def configitems(orig, self, section, unt' | |||
|
156 | 156 | repos += getzcpaths() |
|
157 | 157 | return repos |
|
158 | 158 | |
|
159 | def defaultdest(orig, source): | |
|
160 | for name, path in getzcpaths(): | |
|
161 | if path == source: | |
|
162 | return name.encode(encoding.encoding) | |
|
163 | return orig(source) | |
|
164 | ||
|
159 | 165 | extensions.wrapfunction(ui.ui, 'config', config) |
|
160 | 166 | extensions.wrapfunction(ui.ui, 'configitems', configitems) |
|
167 | extensions.wrapfunction(hg, 'defaultdest', defaultdest) | |
|
161 | 168 | hgweb_mod.hgweb = hgwebzc |
|
162 | 169 | hgwebdir_mod.hgwebdir = hgwebdirzc |
General Comments 0
You need to be logged in to leave comments.
Login now