# HG changeset patch # User Augie Fackler # Date 1464039919 14400 # Node ID c161586a6b771b2ae6d61f0cc0152fae75b356f0 # Parent 020917cde9f5ccd052bf79e7aaf0c6f190807cc1# Parent 4f1461428334aaf7aa68116516afb2152cd7e133 Merge with stable. diff --git a/tests/test_hooks.py b/tests/test_hooks.py --- a/tests/test_hooks.py +++ b/tests/test_hooks.py @@ -17,7 +17,7 @@ class TestHooks(test_util.TestBase): def test_updatemetahook(self): repo, repo_path = self._loadupdate('single_rev.svndump') - state = repo.parents() + state = repo[None].parents() self.add_svn_rev(repo_path, {'trunk/alpha': 'Changed'}) commands.pull(self.repo.ui, self.repo) diff --git a/tests/test_pull.py b/tests/test_pull.py --- a/tests/test_pull.py +++ b/tests/test_pull.py @@ -20,37 +20,37 @@ class TestPull(test_util.TestBase): def test_nochanges(self): self._loadupdate('single_rev.svndump') - state = self.repo.parents() + state = self.repo[None].parents() commands.pull(self.repo.ui, self.repo) - self.assertEqual(state, self.repo.parents()) + self.assertEqual(state, self.repo[None].parents()) def test_onerevision_noupdate(self): repo, repo_path = self._loadupdate('single_rev.svndump') - state = repo.parents() + state = repo[None].parents() self.add_svn_rev(repo_path, {'trunk/alpha': 'Changed'}) commands.pull(self.repo.ui, repo) - self.assertEqual(state, repo.parents()) + self.assertEqual(state, repo[None].parents()) self.assertTrue('tip' not in repo['.'].tags()) def test_onerevision_doupdate(self): repo, repo_path = self._loadupdate('single_rev.svndump') - state = repo.parents() + state = repo[None].parents() self.add_svn_rev(repo_path, {'trunk/alpha': 'Changed'}) commands.pull(self.repo.ui, repo, update=True) - self.failIfEqual(state, repo.parents()) + self.failIfEqual(state, repo[None].parents()) self.assertTrue('tip' in repo['.'].tags()) def test_onerevision_divergent(self): repo, repo_path = self._loadupdate('single_rev.svndump') self.commitchanges((('alpha', 'alpha', 'Changed another way'),)) - state = repo.parents() + state = repo[None].parents() self.add_svn_rev(repo_path, {'trunk/alpha': 'Changed one way'}) try: commands.pull(self.repo.ui, repo, update=True) except hgutil.Abort: # hg < 1.9 raised when crossing branches pass - self.assertEqual(state, repo.parents()) + self.assertEqual(state, repo[None].parents()) self.assertTrue('tip' not in repo['.'].tags()) self.assertEqual(len(repo.heads()), 2) diff --git a/tests/test_pull_fallback.py b/tests/test_pull_fallback.py --- a/tests/test_pull_fallback.py +++ b/tests/test_pull_fallback.py @@ -37,14 +37,14 @@ class TestPullFallback(test_util.TestBas # Passing stupid=True doesn't seem to be working - force it repo.ui.setconfig('hgsubversion', 'stupid', "true") - state = repo.parents() + state = repo[None].parents() calls, replaced = _monkey_patch(to_patch) try: self.add_svn_rev(repo_path, {'trunk/alpha': 'Changed'}) commands.pull(self.repo.ui, repo, update=True) - self.failIfEqual(state, repo.parents()) + self.failIfEqual(state, repo[None].parents()) self.assertTrue('tip' in repo[None].tags()) self.assertEqual(expected_calls, calls)