# HG changeset patch # User Sean Farley # Date 1494535870 25200 # Node ID c0b16b801687be26d14cabe501678e24b2a3c117 # Parent e6ff007e107e434b35eb881711f459c7a75c91b2 committablectx: extra is already normalized by committablectx.__init__ Avoid doing the same work again. Based on work done by Mads Kiilerix. diff -r e6ff007e107e -r c0b16b801687 mercurial/context.py --- a/mercurial/context.py Thu Jun 01 00:40:52 2017 -0700 +++ b/mercurial/context.py Thu May 11 13:51:10 2017 -0700 @@ -2079,14 +2079,6 @@ # 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) @@ -2299,14 +2291,6 @@ 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)