Mercurial > hgsubversion
comparison tests/test_pull_fallback.py @ 1417:4f1461428334 stable
test_hooks: cope with localrepo.parents() going away
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Mon, 23 May 2016 17:15:58 -0400 |
parents | f6c9394032cb |
children |
comparison
equal
deleted
inserted
replaced
1409:fc80c25bc94b | 1417:4f1461428334 |
---|---|
35 repo, repo_path = self._loadupdate('single_rev.svndump') | 35 repo, repo_path = self._loadupdate('single_rev.svndump') |
36 self.stupid = False | 36 self.stupid = False |
37 | 37 |
38 # Passing stupid=True doesn't seem to be working - force it | 38 # Passing stupid=True doesn't seem to be working - force it |
39 repo.ui.setconfig('hgsubversion', 'stupid', "true") | 39 repo.ui.setconfig('hgsubversion', 'stupid', "true") |
40 state = repo.parents() | 40 state = repo[None].parents() |
41 | 41 |
42 calls, replaced = _monkey_patch(to_patch) | 42 calls, replaced = _monkey_patch(to_patch) |
43 | 43 |
44 try: | 44 try: |
45 self.add_svn_rev(repo_path, {'trunk/alpha': 'Changed'}) | 45 self.add_svn_rev(repo_path, {'trunk/alpha': 'Changed'}) |
46 commands.pull(self.repo.ui, repo, update=True) | 46 commands.pull(self.repo.ui, repo, update=True) |
47 self.failIfEqual(state, repo.parents()) | 47 self.failIfEqual(state, repo[None].parents()) |
48 self.assertTrue('tip' in repo[None].tags()) | 48 self.assertTrue('tip' in repo[None].tags()) |
49 self.assertEqual(expected_calls, calls) | 49 self.assertEqual(expected_calls, calls) |
50 | 50 |
51 finally: | 51 finally: |
52 _monkey_unpatch(replaced) | 52 _monkey_unpatch(replaced) |