Patchwork [STABLE] memctx: substate needs to be {} instead of None

login
register
mail settings
Submitter Sean Farley
Date July 25, 2014, 1:39 p.m.
Message ID <d39d9f00acd63d085588.1406295553@laptop.local>
Download mbox | patch
Permalink /patch/5199/
State Accepted
Commit c8411fb5dfef1284d6a757d1eb610623104287d0
Headers show

Comments

Sean Farley - July 25, 2014, 1:39 p.m.
# HG changeset patch
# User Sean Farley <sean.michael.farley@gmail.com>
# Date 1405534059 18000
#      Wed Jul 16 13:07:39 2014 -0500
# Node ID d39d9f00acd63d0855887933dabcd65f877dd790
# Parent  7142e04b438eab39685e63085503b8af0e42b31e
memctx: substate needs to be {} instead of None

Setting substate to None was an oversight in 7cfd94ec5d30 and this patch
corrects it by setting substate to an empty dictionary which matches what
subrepo code expects.
Matt Mackall - July 25, 2014, 1:42 p.m.
On Fri, 2014-07-25 at 08:39 -0500, Sean Farley wrote:
> # HG changeset patch
> # User Sean Farley <sean.michael.farley@gmail.com>
> # Date 1405534059 18000
> #      Wed Jul 16 13:07:39 2014 -0500
> # Node ID d39d9f00acd63d0855887933dabcd65f877dd790
> # Parent  7142e04b438eab39685e63085503b8af0e42b31e
> memctx: substate needs to be {} instead of None

Queued for stable, thanks.

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -1575,11 +1575,11 @@  class memctx(committablectx):
         p1, p2 = parents
         self._parents = [changectx(self._repo, p) for p in (p1, p2)]
         files = sorted(set(files))
         self._status = [files, [], [], [], []]
         self._filectxfn = filectxfn
-        self.substate = None
+        self.substate = {}
 
         self._extra = extra and extra.copy() or {}
         if self._extra.get('branch', '') == '':
             self._extra['branch'] = 'default'