Looks good to me. I'd mention extra is normalized by "changelog.add" in commit message.
Excerpts from Sean Farley's message of 2017-05-31 15:54:24 -0700: > # HG changeset patch > # User Sean Farley <s...@farley.io> > # Date 1494535870 25200 > # Thu May 11 13:51:10 2017 -0700 > # Branch wctxds > # Node ID 60b3e8946da728c377a3a6aadb785ae308084614 > # Parent 5313d98089f569efffaca25de60e73be04156713 > committablectx: extra is already normalized > > Avoid doing the same work again. Based on work done by Mads Kiilerix. > > diff --git a/mercurial/context.py b/mercurial/context.py > index f1014ab..e2994e7 100644 > --- a/mercurial/context.py > +++ b/mercurial/context.py > @@ -2077,18 +2077,10 @@ class memctx(committablectx): > self._filectxfn = getfilectx > else: > # memoizing increases performance for e.g. vcs convert scenarios. > self._filectxfn = makecachingfilectxfn(filectxfn) > > - if extra: > - self._extra = extra.copy() > - else: > - self._extra = {} > - > - if self._extra.get('branch', '') == '': > - self._extra['branch'] = 'default' > - > if editor: > self._text = editor(self._repo, self, []) > self._repo.savecommitmessage(self._text) > > def filectx(self, path, filelog=None): > @@ -2297,18 +2289,10 @@ class metadataonlyctx(committablectx): > 'its p2 doesn\'t match the new ctx p2') > > self._files = originalctx.files() > self.substate = {} > > - if extra: > - self._extra = extra.copy() > - else: > - self._extra = {} > - > - if self._extra.get('branch', '') == '': > - self._extra['branch'] = 'default' > - > if editor: > self._text = editor(self._repo, self, []) > self._repo.savecommitmessage(self._text) > > def manifestnode(self): _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel