mercurial/context.py
changeset 32781 448fc659a430
parent 32765 041d976b662a
child 32812 add613cddcb6
equal deleted inserted replaced
32780:5e76a07e9f42 32781:448fc659a430
  2104         if branch is not None:
  2104         if branch is not None:
  2105             self._extra['branch'] = encoding.fromlocal(branch)
  2105             self._extra['branch'] = encoding.fromlocal(branch)
  2106         self.substate = {}
  2106         self.substate = {}
  2107 
  2107 
  2108         if isinstance(filectxfn, patch.filestore):
  2108         if isinstance(filectxfn, patch.filestore):
  2109             self._filectxfn = memfilefrompatch(filectxfn)
  2109             filectxfn = memfilefrompatch(filectxfn)
  2110         elif not callable(filectxfn):
  2110         elif not callable(filectxfn):
  2111             # if store is not callable, wrap it in a function
  2111             # if store is not callable, wrap it in a function
  2112             self._filectxfn = memfilefromctx(filectxfn)
  2112             filectxfn = memfilefromctx(filectxfn)
  2113         else:
  2113 
  2114             # memoizing increases performance for e.g. vcs convert scenarios.
  2114         # memoizing increases performance for e.g. vcs convert scenarios.
  2115             self._filectxfn = makecachingfilectxfn(filectxfn)
  2115         self._filectxfn = makecachingfilectxfn(filectxfn)
  2116 
  2116 
  2117         if editor:
  2117         if editor:
  2118             self._text = editor(self._repo, self, [])
  2118             self._text = editor(self._repo, self, [])
  2119             self._repo.savecommitmessage(self._text)
  2119             self._repo.savecommitmessage(self._text)
  2120 
  2120