From patchwork Sat Jan 30 01:39:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D9923: config: use the right API to access git-submodule From: phabricator X-Patchwork-Id: 48234 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Sat, 30 Jan 2021 01:39:51 +0000 marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D9923 AFFECTED FILES hgext/convert/git.py CHANGE DETAILS To: marmoute, #hg-reviewers Cc: mercurial-patches, mercurial-devel diff --git a/hgext/convert/git.py b/hgext/convert/git.py --- a/hgext/convert/git.py +++ b/hgext/convert/git.py @@ -247,7 +247,8 @@ b'\n'.join(line.strip() for line in content.split(b'\n')), ) for sec in c.sections(): - s = c[sec] + # turn the config object into a real dict + s = dict(c.items(sec)) if b'url' in s and b'path' in s: self.submodules.append(submodule(s[b'path'], b'', s[b'url']))