# HG changeset patch # User Alexander Solovyov # Date 1236250693 -7200 # Node ID c2cd8d772805f912d47fe151ceff6769ede4d22e # Parent dd73860c60592f7e2679fe67f82e06ba9949d28f zeroconf: advertise repositories with hostname diff -r dd73860c6059 -r c2cd8d772805 hgext/zeroconf/__init__.py --- a/hgext/zeroconf/__init__.py Mon Mar 16 17:56:50 2009 -0500 +++ b/hgext/zeroconf/__init__.py Thu Mar 05 12:58:13 2009 +0200 @@ -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.',