D3520: remotenames: enable the storage config option if extension is enabled

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Thu May 10 13:29:38 UTC 2018


pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  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.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D3520

AFFECTED FILES
  hgext/remotenames.py
  tests/test-logexchange.t

CHANGE DETAILS

diff --git a/tests/test-logexchange.t b/tests/test-logexchange.t
--- a/tests/test-logexchange.t
+++ b/tests/test-logexchange.t
@@ -6,8 +6,6 @@
   > ssh = python "$TESTDIR/dummyssh"
   > [alias]
   > glog = log -G -T '{rev}:{node|short}  {desc}'
-  > [experimental]
-  > remotenames = True
   > [extensions]
   > remotenames =
   > show =
diff --git a/hgext/remotenames.py b/hgext/remotenames.py
--- a/hgext/remotenames.py
+++ b/hgext/remotenames.py
@@ -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
 



To: pulkit, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list