Patchwork D9921: config: use the right API to access subrepository section

login
register
mail settings
Submitter phabricator
Date Jan. 30, 2021, 1:39 a.m.
Message ID <differential-rev-PHID-DREV-cjkduzqc5feoskc43cut-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48232/
State Superseded
Headers show

Comments

phabricator - Jan. 30, 2021, 1:39 a.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  Preventing direct access to the underlying dict will help a coming refactoring
  of `config`.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/subrepoutil.py

CHANGE DETAILS




To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/subrepoutil.py b/mercurial/subrepoutil.py
--- a/mercurial/subrepoutil.py
+++ b/mercurial/subrepoutil.py
@@ -105,7 +105,7 @@ 
         return src
 
     state = {}
-    for path, src in p[b''].items():
+    for path, src in p.items(b''):
         kind = b'hg'
         if src.startswith(b'['):
             if b']' not in src: