mercurial/context.py
changeset 32609 c0b16b801687
parent 32519 6ae068f801e3
child 32610 bf728e72a219
equal deleted inserted replaced
32605:e6ff007e107e 32609:c0b16b801687
  2077             self._filectxfn = getfilectx
  2077             self._filectxfn = getfilectx
  2078         else:
  2078         else:
  2079             # memoizing increases performance for e.g. vcs convert scenarios.
  2079             # memoizing increases performance for e.g. vcs convert scenarios.
  2080             self._filectxfn = makecachingfilectxfn(filectxfn)
  2080             self._filectxfn = makecachingfilectxfn(filectxfn)
  2081 
  2081 
  2082         if extra:
       
  2083             self._extra = extra.copy()
       
  2084         else:
       
  2085             self._extra = {}
       
  2086 
       
  2087         if self._extra.get('branch', '') == '':
       
  2088             self._extra['branch'] = 'default'
       
  2089 
       
  2090         if editor:
  2082         if editor:
  2091             self._text = editor(self._repo, self, [])
  2083             self._text = editor(self._repo, self, [])
  2092             self._repo.savecommitmessage(self._text)
  2084             self._repo.savecommitmessage(self._text)
  2093 
  2085 
  2094     def filectx(self, path, filelog=None):
  2086     def filectx(self, path, filelog=None):
  2297                                'its p2 doesn\'t match the new ctx p2')
  2289                                'its p2 doesn\'t match the new ctx p2')
  2298 
  2290 
  2299         self._files = originalctx.files()
  2291         self._files = originalctx.files()
  2300         self.substate = {}
  2292         self.substate = {}
  2301 
  2293 
  2302         if extra:
       
  2303             self._extra = extra.copy()
       
  2304         else:
       
  2305             self._extra = {}
       
  2306 
       
  2307         if self._extra.get('branch', '') == '':
       
  2308             self._extra['branch'] = 'default'
       
  2309 
       
  2310         if editor:
  2294         if editor:
  2311             self._text = editor(self._repo, self, [])
  2295             self._text = editor(self._repo, self, [])
  2312             self._repo.savecommitmessage(self._text)
  2296             self._repo.savecommitmessage(self._text)
  2313 
  2297 
  2314     def manifestnode(self):
  2298     def manifestnode(self):