configitems: register the 'bundle.mainreporoot' config
authorPierre-Yves David <pierre-yves.david@octobus.net>
Fri, 30 Jun 2017 03:31:26 +0200
changeset 33182 634997248c97
parent 33181 640a0760e666
child 33183 9f95f0bb343b
configitems: register the 'bundle.mainreporoot' config
mercurial/bundlerepo.py
mercurial/configitems.py
mercurial/unionrepo.py
--- a/mercurial/bundlerepo.py	Fri Jun 30 03:28:28 2017 +0200
+++ b/mercurial/bundlerepo.py	Fri Jun 30 03:31:26 2017 +0200
@@ -414,7 +414,7 @@
     if create:
         raise error.Abort(_('cannot create new bundle repository'))
     # internal config: bundle.mainreporoot
-    parentpath = ui.config("bundle", "mainreporoot", "")
+    parentpath = ui.config("bundle", "mainreporoot")
     if not parentpath:
         # try to find the correct path to the working directory repo
         parentpath = cmdutil.findrepo(pycompat.getcwd())
--- a/mercurial/configitems.py	Fri Jun 30 03:28:28 2017 +0200
+++ b/mercurial/configitems.py	Fri Jun 30 03:31:26 2017 +0200
@@ -63,6 +63,10 @@
 coreconfigitem('bookmarks', 'pushing',
     default=list,
 )
+# bundle.mainreporoot: internal hack for bundlerepo
+coreconfigitem('bundle', 'mainreporoot',
+    default='',
+)
 coreconfigitem('color', 'mode',
     default='auto',
 )
--- a/mercurial/unionrepo.py	Fri Jun 30 03:28:28 2017 +0200
+++ b/mercurial/unionrepo.py	Fri Jun 30 03:31:26 2017 +0200
@@ -232,7 +232,7 @@
 def instance(ui, path, create):
     if create:
         raise error.Abort(_('cannot create new union repository'))
-    parentpath = ui.config("bundle", "mainreporoot", "")
+    parentpath = ui.config("bundle", "mainreporoot")
     if not parentpath:
         # try to find the correct path to the working directory repo
         parentpath = cmdutil.findrepo(pycompat.getcwd())