Mercurial > public > mercurial-scm > hg-stable
diff mercurial/localrepo.py @ 22787:4a13849ca359
manifest: simplify manifest.add() by making args required
I verified that changed was never false (it was always a 2-tuple) by
adding
@@ -220,6 +225,8 @@ class manifest(revlog.revlog):
def add(self, map, transaction, link, p1=None, p2=None,
changed=None):
+ if not changed:
+ assert False, 'changed was %r' % changed
# if we're using the cache, make sure it is valid and
# parented by the same node we're diffing against
if not (changed and p1 and (p1 in self._mancache)):
and observing that the test suite still passed. Making all the
arguments required should help future readers understand what's going
on here.
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Wed, 08 Oct 2014 11:52:30 -0400 |
parents | 41421bd9c42e |
children | e994b034e91e |
line wrap: on
line diff
--- a/mercurial/localrepo.py Thu Sep 25 14:13:31 2014 -0400 +++ b/mercurial/localrepo.py Wed Oct 08 11:52:30 2014 -0400 @@ -1415,7 +1415,7 @@ for f in drop: del m1[f] mn = self.manifest.add(m1, trp, linkrev, p1.manifestnode(), - p2.manifestnode(), (new, drop)) + p2.manifestnode(), new, drop) files = changed + removed else: mn = p1.manifestnode()