Mercurial > hgsubversion
comparison tests/test_pull.py @ 1555:cff81f35b31e
cleanup: reference Abort from mercurial.error instead of mercurial.util
It's been there since hg 1.7 or so, which lets us avoid any need for
compat shims.
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Sat, 24 Mar 2018 16:39:30 -0400 |
parents | 4f1461428334 |
children |
comparison
equal
deleted
inserted
replaced
1554:258fb67fb956 | 1555:cff81f35b31e |
---|---|
1 import test_util | 1 import test_util |
2 | 2 |
3 import os.path | 3 import os.path |
4 import subprocess | 4 import subprocess |
5 from mercurial import error as hgerror | |
5 from mercurial import node | 6 from mercurial import node |
6 from mercurial import ui | 7 from mercurial import ui |
7 from mercurial import util as hgutil | 8 from mercurial import util as hgutil |
8 from mercurial import commands | 9 from mercurial import commands |
9 from hgsubversion import verify | 10 from hgsubversion import verify |
45 self.commitchanges((('alpha', 'alpha', 'Changed another way'),)) | 46 self.commitchanges((('alpha', 'alpha', 'Changed another way'),)) |
46 state = repo[None].parents() | 47 state = repo[None].parents() |
47 self.add_svn_rev(repo_path, {'trunk/alpha': 'Changed one way'}) | 48 self.add_svn_rev(repo_path, {'trunk/alpha': 'Changed one way'}) |
48 try: | 49 try: |
49 commands.pull(self.repo.ui, repo, update=True) | 50 commands.pull(self.repo.ui, repo, update=True) |
50 except hgutil.Abort: | 51 except hgerror.Abort: |
51 # hg < 1.9 raised when crossing branches | 52 # hg < 1.9 raised when crossing branches |
52 pass | 53 pass |
53 self.assertEqual(state, repo[None].parents()) | 54 self.assertEqual(state, repo[None].parents()) |
54 self.assertTrue('tip' not in repo['.'].tags()) | 55 self.assertTrue('tip' not in repo['.'].tags()) |
55 self.assertEqual(len(repo.heads()), 2) | 56 self.assertEqual(len(repo.heads()), 2) |