comparison mercurial/context.py @ 21844:7cfd94ec5d30

memctx: explicitly set substate to None In d2743be1bb06, memctx was changed to inherit from committablectx, this in turn added the 'substate' property to memctx. It turns out that the newcommitphase method tested for this property: def newcommitphase(ui, ctx): commitphase = phases.newcommitphase(ui) substate = getattr(ctx, "substate", None) if not substate: return commitphase Currently, memctx isn't ready to handle substates, nor removed files, so we explicitly must set substate=None to get the old behavior back. In the future, we can decide how memctx should play with substate. For now, this fixes third-party extensions and some internal code dealing with subrepos.
author Sean Farley <sean.michael.farley@gmail.com>
date Wed, 02 Jul 2014 15:24:43 -0500
parents b342c3e2518a
children 04f5b5e3792e
comparison
equal deleted inserted replaced
21841:521355a95636 21844:7cfd94ec5d30
1569 p1, p2 = parents 1569 p1, p2 = parents
1570 self._parents = [changectx(self._repo, p) for p in (p1, p2)] 1570 self._parents = [changectx(self._repo, p) for p in (p1, p2)]
1571 files = sorted(set(files)) 1571 files = sorted(set(files))
1572 self._status = [files, [], [], [], []] 1572 self._status = [files, [], [], [], []]
1573 self._filectxfn = filectxfn 1573 self._filectxfn = filectxfn
1574 self.substate = None
1574 1575
1575 self._extra = extra and extra.copy() or {} 1576 self._extra = extra and extra.copy() or {}
1576 if self._extra.get('branch', '') == '': 1577 if self._extra.get('branch', '') == '':
1577 self._extra['branch'] = 'default' 1578 self._extra['branch'] = 'default'
1578 1579