hgext/zeroconf/__init__.py
changeset 34245 a6c18628dff1
parent 33180 a0068f49b5f6
child 42555 fa2071753dc2
--- a/hgext/zeroconf/__init__.py	Fri Jun 30 03:45:42 2017 +0200
+++ b/hgext/zeroconf/__init__.py	Fri Jun 30 03:45:43 2017 +0200
@@ -127,7 +127,9 @@
         with app._obtainrepo() as repo:
             name = app.reponame or os.path.basename(repo.root)
             path = repo.ui.config("web", "prefix", "").strip('/')
-            desc = repo.ui.config("web", "description", name)
+            desc = repo.ui.config("web", "description")
+            if not desc:
+                desc = name
         publish(name, desc, path, port)
     else:
         # webdir
@@ -137,7 +139,9 @@
             u.readconfig(os.path.join(path, '.hg', 'hgrc'))
             name = os.path.basename(repo)
             path = (prefix + repo).strip('/')
-            desc = u.config('web', 'description', name)
+            desc = u.config('web', 'description')
+            if not desc:
+                desc = name
             publish(name, desc, path, port)
     return httpd