comparison tests/test_fetch_command.py @ 569:95eca255739e

test_fetch_command: handle changes in revision extra ordering gracefully This allows the tests to pass both with and without revision f2618cacb485.
author Augie Fackler <durin42@gmail.com>
date Mon, 01 Mar 2010 17:37:00 -0600
parents bb00f7ca5b8c
children d2ef7220a079
comparison
equal deleted inserted replaced
567:04e973e65cea 569:95eca255739e
67 repo = self._load_fixture_and_fetch('many_special_cases.svndump', 67 repo = self._load_fixture_and_fetch('many_special_cases.svndump',
68 stupid=True) 68 stupid=True)
69 self._many_special_cases_checks(repo) 69 self._many_special_cases_checks(repo)
70 70
71 def _many_special_cases_checks(self, repo): 71 def _many_special_cases_checks(self, repo):
72 self.assertEqual(node.hex(repo[0].node()), 72 self.assertEquals(node.hex(repo[0].node()),
73 '434ed487136c1b47c1e8f952edb4dc5a8e6328df') 73 '434ed487136c1b47c1e8f952edb4dc5a8e6328df')
74 self.assertEqual(node.hex(repo['tip'].node()), 74 # two possible hashes for bw compat to hg < 1.5, since hg 1.5
75 'b7bdc73041b1852563deb1ef3f4153c2fe4484f2') 75 # sorts entries in extra()
76 self.assertTrue(node.hex(repo['tip'].node()) in
77 ('e92012d8c170a0236c84166167f149c2e28548c6',
78 'b7bdc73041b1852563deb1ef3f4153c2fe4484f2'))
76 self.assertEqual(node.hex(repo['the_branch'].node()), 79 self.assertEqual(node.hex(repo['the_branch'].node()),
77 '4e256962fc5df545e2e0a51d0d1dc61c469127e6') 80 '4e256962fc5df545e2e0a51d0d1dc61c469127e6')
78 self.assertEqual(node.hex(repo['the_branch'].parents()[0].node()), 81 self.assertEqual(node.hex(repo['the_branch'].parents()[0].node()),
79 'f1ff5b860f5dbb9a59ad0921a79da77f10f25109') 82 'f1ff5b860f5dbb9a59ad0921a79da77f10f25109')
80 self.assertEqual(len(repo['tip'].parents()), 1) 83 self.assertEqual(len(repo['tip'].parents()), 1)