remotenames: enable the storage config option if extension is enabled
authorPulkit Goyal <7895pulkit@gmail.com>
Sun, 29 Apr 2018 22:27:05 +0530
changeset 37983 b9e6b71dc272
parent 37982 7465b908d305
child 37984 3f70466ec7aa
remotenames: enable the storage config option if extension is enabled Before this patch, the config option to store remotenames was set to False by default and remotenames extension does not set it True. So if you enable remotenames extension without setting 'experimental.remotenames=True', you won't get the remotenames. This patch makes remotenames enable the config option if then extension is enabled which makes sense. Differential Revision: https://phab.mercurial-scm.org/D3520
hgext/remotenames.py
tests/test-logexchange.t
--- a/hgext/remotenames.py	Sun Apr 29 22:42:54 2018 +0530
+++ b/hgext/remotenames.py	Sun Apr 29 22:27:05 2018 +0530
@@ -249,6 +249,10 @@
     extensions.wrapfunction(bookmarks, '_printbookmarks', wrapprintbookmarks)
 
 def reposetup(ui, repo):
+
+    # set the config option to store remotenames
+    repo.ui.setconfig('experimental', 'remotenames', True, 'remotenames-ext')
+
     if not repo.local():
         return
 
--- a/tests/test-logexchange.t	Sun Apr 29 22:42:54 2018 +0530
+++ b/tests/test-logexchange.t	Sun Apr 29 22:27:05 2018 +0530
@@ -6,8 +6,6 @@
   > ssh = $PYTHON "$TESTDIR/dummyssh"
   > [alias]
   > glog = log -G -T '{rev}:{node|short}  {desc}'
-  > [experimental]
-  > remotenames = True
   > [extensions]
   > remotenames =
   > show =