changeset 848:4e203a47102a

filemap tests: check the attributes we care about, rather than shas Also made the test a little bit more extensive to satisfy my own paranoia about the feature behavior.
author Augie Fackler <durin42@gmail.com>
date Tue, 31 Jan 2012 08:15:37 -0600
parents 0de18c5c2e35
children 9ce00cb1d676
files tests/test_fetch_mappings.py
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test_fetch_mappings.py
+++ b/tests/test_fetch_mappings.py
@@ -136,13 +136,19 @@ class MapTests(test_util.TestBase):
         filemap = open(self.filemap, 'w')
         filemap.write("exclude alpha\n")
         filemap.write("include .\n")
+        filemap.write("exclude gamma\n")
         filemap.close()
         ui = self.ui(False)
         ui.setconfig('hgsubversion', 'filemap', self.filemap)
         commands.clone(ui, test_util.fileurl(self.repo_path),
                        self.wc_path, filemap=self.filemap)
-        self.assertEqual(node.hex(self.repo[0].node()), '2cd09772e0f6ddf2d13c60ef3c1be11ad5a7dfae')
-        self.assertEqual(node.hex(self.repo['default'].node()), '8a525ca0671f456e6b1417187bf86c6115d2cb78')
+        # The exclusion of alpha is overridden by the later rule to
+        # include all of '.', whereas gamma should remain excluded
+        # because it's excluded after the root directory.
+        self.assertEqual(self.repo[0].manifest().keys(),
+                         ['alpha', 'beta'])
+        self.assertEqual(self.repo['default'].manifest().keys(),
+                         ['alpha', 'beta'])
 
     def test_branchmap(self, stupid=False):
         test_util.load_svndump_fixture(self.repo_path, 'branchmap.svndump')