Mercurial > public > mercurial-scm > hg-stable
diff mercurial/context.py @ 23602:a4679a74df14
merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 18 Dec 2014 16:41:59 -0600 |
parents | 200215cdf7aa b1179dabc6de |
children | d74eb8d477d5 |
line wrap: on
line diff
--- a/mercurial/context.py Wed Dec 17 15:11:26 2014 -0800 +++ b/mercurial/context.py Thu Dec 18 16:41:59 2014 -0600 @@ -17,6 +17,11 @@ propertycache = util.propertycache +# Phony node value to stand-in for new files in some uses of +# manifests. Manifests support 21-byte hashes for nodes which are +# dirty in the working copy. +_newnode = '!' * 21 + class basectx(object): """A basectx object represents the common logic for its children: changectx: read-only context that is already present in the repo, @@ -104,7 +109,7 @@ if (fn not in deletedset and ((fn in withflags and mf1.flags(fn) != mf2.flags(fn)) or (mf1[fn] != mf2node and - (mf2node or self[fn].cmp(other[fn]))))): + (mf2node != _newnode or self[fn].cmp(other[fn]))))): modified.append(fn) elif listclean: clean.append(fn) @@ -1382,7 +1387,7 @@ """ mf = self._repo['.']._manifestmatches(match, s) for f in s.modified + s.added: - mf[f] = None + mf[f] = _newnode mf.setflag(f, self.flags(f)) for f in s.removed: if f in mf: