D917: eol: make [eol] config section sensitive for chg confighash

quark (Jun Wu) phabricator at mercurial-scm.org
Tue Oct 3 02:25:24 UTC 2017


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

REVISION SUMMARY
  The eol extension may mangle the [eol] config section and that means chg is
  unable to detect config file change (because it re-applies setconfig
  changes).
  
  This makes test-eol.t pass with chg.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  hgext/eol.py

CHANGE DETAILS

diff --git a/hgext/eol.py b/hgext/eol.py
--- a/hgext/eol.py
+++ b/hgext/eol.py
@@ -97,6 +97,7 @@
 import re
 from mercurial.i18n import _
 from mercurial import (
+    chgserver,
     config,
     error as errormod,
     extensions,
@@ -295,7 +296,8 @@
                   "win32text extension\n"))
     except KeyError:
         pass
-
+    # make [eol] sensitive for chg confighash
+    chgserver._configsections.append('eol')
 
 def reposetup(ui, repo):
     uisetup(repo.ui)



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


More information about the Mercurial-devel mailing list