Patchwork D1158: test-show: make it compatible with chg

login
register
mail settings
Submitter phabricator
Date Oct. 17, 2017, 5:50 p.m.
Message ID <differential-rev-PHID-DREV-q2h2laxuor2enkygik4j-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/25125/
State Superseded
Headers show

Comments

phabricator - Oct. 17, 2017, 5:50 p.m.
quark created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  The show extension reads `commands.show.aliasprefix` config in its
  `extsetup` and that causes issues with chg. This patch adds that config item
  to chg confighash to solve the issue.

TEST PLAN
  `run-tests.py -l --chg test-show.t`

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/chgserver.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/chgserver.py b/mercurial/chgserver.py
--- a/mercurial/chgserver.py
+++ b/mercurial/chgserver.py
@@ -73,6 +73,10 @@ 
     'extensions',
 ]
 
+_configsectionitems = [
+    ('commands', 'show.aliasprefix'), # show.py reads it in extsetup
+]
+
 # sensitive environment variables affecting confighash
 _envre = re.compile(r'''\A(?:
                     CHGHG
@@ -101,6 +105,8 @@ 
     sectionitems = []
     for section in _configsections:
         sectionitems.append(ui.configitems(section))
+    for section, item in _configsectionitems:
+        sectionitems.append(ui.config(section, item))
     sectionhash = _hashlist(sectionitems)
     envitems = [(k, v) for k, v in encoding.environ.iteritems()
                 if _envre.match(k)]