Mercurial > hg
diff tests/test-manifest.py @ 24495:d2a3a2808974
manifest: make manifest.intersectfiles() internal
manifest.intersectfiles() is just a utility used by manifest.matches(), and
a future commit removes intersectfiles for treemanifest for optimization
purposes.
This commit makes the intersectfiles methods on manifestdict and treemanifest
internal, and converts its test to a more generic testMatches(), which has the
exact same coverage.
author | Drew Gottlieb <drgott@google.com> |
---|---|
date | Mon, 30 Mar 2015 10:43:52 -0700 |
parents | 016b71ea7dc7 |
children | bcf0de51326e |
line wrap: on
line diff
--- a/tests/test-manifest.py Sat Mar 28 11:19:34 2015 +0100 +++ b/tests/test-manifest.py Mon Mar 30 10:43:52 2015 -0700 @@ -250,9 +250,13 @@ self.assertEqual(HUGE_MANIFEST_ENTRIES, len(m)) self.assertEqual(len(m), len(list(m))) - def testIntersectFiles(self): + def testMatches(self): m = parsemanifest(A_HUGE_MANIFEST) - m2 = m.intersectfiles(['file1', 'file200', 'file300']) + + match = matchmod.match('/', '', + ['file1', 'file200', 'file300'], exact=True) + m2 = m.matches(match) + w = ('file1\0%sx\n' 'file200\0%sl\n' 'file300\0%s\n') % (HASH_2, HASH_1, HASH_1)