comparison tests/test_tags.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 7bb6562feb85
comparison
equal deleted inserted replaced
1587:4889843a704e 1588:e2d38f6b8afe
70 70
71 def test_deletion_of_tag_on_trunk_after_branching(self): 71 def test_deletion_of_tag_on_trunk_after_branching(self):
72 repo = self._load_fixture_and_fetch('tag_deletion_tag_branch.svndump') 72 repo = self._load_fixture_and_fetch('tag_deletion_tag_branch.svndump')
73 branches = set(repo[h].extra()['branch'] for h in repo.heads()) 73 branches = set(repo[h].extra()['branch'] for h in repo.heads())
74 self.assertEqual(branches, set(['default', 'from_2', ])) 74 self.assertEqual(branches, set(['default', 'from_2', ]))
75 self.assertEqual( 75 # two hash values because from hg > 4.8, we try hard to reuse a manifest
76 repo.tags(), 76 # which leads to hash change of empty changesets
77 {'tip': 'g\xdd\xcd\x93\x03g\x1e\x7f\xa6-[V%\x99\x07\xd3\x9d>(\x94', 77 self.assertTrue(
78 'new_tag': '=\xb8^\xb5\x18\xa9M\xdb\xf9\xb62Z\xa0\xb5R6+\xfe6.'}) 78 repo.tags() in
79 ({'tip': 'g\xdd\xcd\x93\x03g\x1e\x7f\xa6-[V%\x99\x07\xd3\x9d>(\x94',
80 'new_tag': '=\xb8^\xb5\x18\xa9M\xdb\xf9\xb62Z\xa0\xb5R6+\xfe6.'},
81 {'new_tag': '\x1d+\xb8v:6@9D\x9f\xb9\xf4o\xd4n\x8e\x93\xd7\x07\xe3',
82 'tip': 'F/\xb8V\xd9\x00\xdb\xca\x9b\xd7\x90+O\x02\xbe\xe5\xd6\xc6\x7f\x99'}))
79 83
80 def test_tags_in_unusual_location(self): 84 def test_tags_in_unusual_location(self):
81 repo = self._load_fixture_and_fetch('unusual_tags.svndump') 85 repo = self._load_fixture_and_fetch('unusual_tags.svndump')
82 branches = set(repo[h].extra()['branch'] 86 branches = set(repo[h].extra()['branch']
83 for h in repo.heads()) 87 for h in repo.heads())