comparison tests/test_fetch_mappings.py @ 1588:e2d38f6b8afe

tests: make output comaptible with hash changes in hg-4.8 46da52f4b820 in core mercurial added logic to try hard to reuse manifest if we can. In the tests of hgsubversion, there are lot of cases we create an empty commit with just branch name changed. In hg < 4.8, hgsubversion used to create a new manifest entry for that commit but after that patch, empty commit started using the manifest of the parent leading to hash change.
author Pulkit Goyal <pulkit@yandex-team.ru>
date Wed, 31 Oct 2018 17:04:57 +0300
parents d55c9d0ba350
children
comparison
equal deleted inserted replaced
1587:4889843a704e 1588:e2d38f6b8afe
145 @test_util.requiresreplay 145 @test_util.requiresreplay
146 def test_file_map(self): 146 def test_file_map(self):
147 repo = self._loadwithfilemap('replace_trunk_with_branch.svndump', 147 repo = self._loadwithfilemap('replace_trunk_with_branch.svndump',
148 "include alpha\n") 148 "include alpha\n")
149 self.assertEqual(node.hex(repo[0].node()), '88e2c7492d83e4bf30fbb2dcbf6aa24d60ac688d') 149 self.assertEqual(node.hex(repo[0].node()), '88e2c7492d83e4bf30fbb2dcbf6aa24d60ac688d')
150 self.assertEqual(node.hex(revsymbol(repo, 'default').node()), 'e524296152246b3837fe9503c83b727075835155') 150 self.assertTrue(node.hex(revsymbol(repo, 'default').node()) in
151 ('e524296152246b3837fe9503c83b727075835155',
152 'ecf9b521a1799ebb0e01c1d1e86305ea8b542d2e'))
151 153
152 @test_util.requiresreplay 154 @test_util.requiresreplay
153 def test_file_map_exclude(self): 155 def test_file_map_exclude(self):
154 repo = self._loadwithfilemap('replace_trunk_with_branch.svndump', 156 repo = self._loadwithfilemap('replace_trunk_with_branch.svndump',
155 "exclude alpha\n") 157 "exclude alpha\n")
156 self.assertEqual(node.hex(repo[0].node()), '2c48f3525926ab6c8b8424bcf5eb34b149b61841') 158 self.assertEqual(node.hex(repo[0].node()), '2c48f3525926ab6c8b8424bcf5eb34b149b61841')
157 self.assertEqual(node.hex(revsymbol(repo, 'default').node()), 'b37a3c0297b71f989064d9b545b5a478bbed7cc1') 159 self.assertTrue(node.hex(revsymbol(repo, 'default').node()) in
160 ('b37a3c0297b71f989064d9b545b5a478bbed7cc1',
161 'e494691507b55deeb85c9c362d47b427f5c644ad'))
158 162
159 @test_util.requiresreplay 163 @test_util.requiresreplay
160 def test_file_map_rule_order(self): 164 def test_file_map_rule_order(self):
161 repo = self._loadwithfilemap('replace_trunk_with_branch.svndump', 165 repo = self._loadwithfilemap('replace_trunk_with_branch.svndump',
162 "exclude alpha\ninclude .\nexclude gamma\n") 166 "exclude alpha\ninclude .\nexclude gamma\n")