Mercurial > hg
diff tests/test-manifest.py @ 31255:959ebff3505a
manifest: add match argument to diff and filesnotin
As part of removing manifest.matches (since it is O(manifest)), let's start by
adding match arguments to diff and filesnotin. As we'll see in later patches,
these are the only flows that actually use matchers, so by moving the matching
into the actual functions, other manifest implementations can make more efficient
algorithsm.
For instance, this will allow treemanifest diff's to only iterate over the files
that are different AND meet the match criteria.
No consumers are changed in this patches, but the code is fairly easy to verify
visually. Future patches will convert consumers to use it.
One test was affected because it did not use the kwargs version of the clean
parameter.
author | Durham Goode <durham@fb.com> |
---|---|
date | Tue, 07 Mar 2017 09:56:11 -0800 |
parents | b9ed5a88710c |
children | 94c1d3c1aea2 |
line wrap: on
line diff
--- a/tests/test-manifest.py Thu Mar 09 00:07:13 2017 +0900 +++ b/tests/test-manifest.py Tue Mar 07 09:56:11 2017 -0800 @@ -320,7 +320,7 @@ 'bar/baz/qux.py': None, 'foo': (MISSING, (BIN_HASH_1, '')), } - self.assertEqual(want, pruned.diff(short, True)) + self.assertEqual(want, pruned.diff(short, clean=True)) def testReversedLines(self): backwards = ''.join(