changeset 33184:634997248c97

configitems: register the 'bundle.mainreporoot' config
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 30 Jun 2017 03:31:26 +0200
parents 640a0760e666
children 9f95f0bb343b
files mercurial/bundlerepo.py mercurial/configitems.py mercurial/unionrepo.py
diffstat 3 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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())