--- a/hgext/zeroconf/__init__.py Sat Feb 06 17:37:52 2010 +0100
+++ b/hgext/zeroconf/__init__.py Sat Feb 06 17:31:49 2010 +0100
@@ -24,7 +24,7 @@
'''
import Zeroconf, socket, time, os
-from mercurial import ui
+from mercurial import ui, hg, encoding
from mercurial import extensions
from mercurial.hgweb import hgweb_mod
from mercurial.hgweb import hgwebdir_mod
@@ -156,7 +156,14 @@
repos += getzcpaths()
return repos
+def defaultdest(orig, source):
+ for name, path in getzcpaths():
+ if path == source:
+ return name.encode(encoding.encoding)
+ return orig(source)
+
extensions.wrapfunction(ui.ui, 'config', config)
extensions.wrapfunction(ui.ui, 'configitems', configitems)
+extensions.wrapfunction(hg, 'defaultdest', defaultdest)
hgweb_mod.hgweb = hgwebzc
hgwebdir_mod.hgwebdir = hgwebdirzc