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/D9922 AFFECTED FILES mercurial/templater.py CHANGE DETAILS diff --git a/mercurial/templater.py b/mercurial/templater.py --- a/mercurial/templater.py +++ b/mercurial/templater.py @@ -891,7 +891,7 @@ fp = _open_mapfile(path) cache, tmap, aliases = _readmapfile(fp, path) - for key, val in conf[b'templates'].items(): + for key, val in conf.items(b'templates'): if not val: raise error.ParseError( _(b'missing value'), conf.source(b'templates', key) @@ -904,7 +904,7 @@ cache[key] = unquotestring(val) elif key != b'__base__': tmap[key] = os.path.join(base, val) - aliases.extend(conf[b'templatealias'].items()) + aliases.extend(conf.items(b'templatealias')) return cache, tmap, aliases To: marmoute, #hg-reviewers Cc: mercurial-patches, mercurial-devel _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel