changeset 32609:c0b16b801687

committablectx: extra is already normalized by committablectx.__init__ Avoid doing the same work again. Based on work done by Mads Kiilerix.
author Sean Farley <sean@farley.io>
date Thu, 11 May 2017 13:51:10 -0700
parents e6ff007e107e
children bf728e72a219
files mercurial/context.py
diffstat 1 files changed, 0 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- 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)