Mercurial > hg-stable
changeset 23594:6f53629ad273 stable
manifest: disallow setting the node id of an entry to None
manifest.diff() uses None as a special value to denote the absence of
a file, so setting a file node to None means you then can't trust
manifest.diff().
This should also make future manifest work slightly easier.
author | Augie Fackler <augie@google.com> |
---|---|
date | Fri, 12 Dec 2014 13:40:44 -0500 |
parents | b1179dabc6de |
children | 035434b407be |
files | mercurial/manifest.py |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/manifest.py Fri Dec 12 15:29:54 2014 -0500 +++ b/mercurial/manifest.py Fri Dec 12 13:40:44 2014 -0500 @@ -17,6 +17,9 @@ flags = {} dict.__init__(self, mapping) self._flags = flags + def __setitem__(self, k, v): + assert v is not None + dict.__setitem__(self, k, v) def flags(self, f): return self._flags.get(f, "") def withflags(self):