[PATCH] zeroconf: advertise repositories with hostname
Alexander Solovyov
piranha at piranha.org.ua
Sun Mar 1 06:24:01 CST 2009
# HG changeset patch
# User Alexander Solovyov <piranha at piranha.org.ua>
# Date 1235910221 -7200
# Node ID 9be53ff2d6f48bd279e6bd5acbb94e5a78ceb44c
# Parent 5b010dae99c3cc518364ca4f8422762342285a97
zeroconf: advertise repositories with hostname
diff --git a/hgext/zeroconf/__init__.py b/hgext/zeroconf/__init__.py
--- a/hgext/zeroconf/__init__.py
+++ b/hgext/zeroconf/__init__.py
@@ -77,8 +77,9 @@
ip = getip()
localip = socket.inet_aton(ip)
- parts = socket.gethostname().split('.')
- host = parts[0] + ".local"
+ hostname = socket.gethostname().split('.')[0]
+ host = hostname + ".local"
+ name = "%s-%s" % (hostname, name)
# advertise to browsers
svc = Zeroconf.ServiceInfo('_http._tcp.local.',
More information about the Mercurial-devel
mailing list