hgext/zeroconf/__init__.py
branchstable
changeset 27910 d2c5ad3deccb
parent 25186 80c5b2666a96
child 28038 72f2a19c5f88
--- a/hgext/zeroconf/__init__.py	Sun Jan 17 21:40:21 2016 -0600
+++ b/hgext/zeroconf/__init__.py	Sun Jan 17 20:37:29 2016 -0800
@@ -113,9 +113,10 @@
         repos = app.repos
     except AttributeError:
         # single repo
-        name = app.reponame or os.path.basename(app.repo.root)
-        path = app.repo.ui.config("web", "prefix", "").strip('/')
-        desc = app.repo.ui.config("web", "description", name)
+        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)
         publish(name, desc, path, port)
     else:
         # webdir