Mercurial > hgsubversion
comparison hgsubversion/replay.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 | 8410a978c650 |
children | ae572c9be4e6 |
comparison
equal
deleted
inserted
replaced
1554:258fb67fb956 | 1555:cff81f35b31e |
---|---|
1 import errno | 1 import errno |
2 import traceback | 2 import traceback |
3 | 3 |
4 from mercurial import error as hgerror | |
4 from mercurial import revlog | 5 from mercurial import revlog |
5 from mercurial import node | 6 from mercurial import node |
6 from mercurial import context | 7 from mercurial import context |
7 from mercurial import util as hgutil | 8 from mercurial import util as hgutil |
8 | 9 |
91 failoninvalid = ui.configbool('hgsubversion', | 92 failoninvalid = ui.configbool('hgsubversion', |
92 'failoninvalidreplayfile', False) | 93 'failoninvalidreplayfile', False) |
93 for f in files_to_commit: | 94 for f in files_to_commit: |
94 if not meta.is_path_valid(f): | 95 if not meta.is_path_valid(f): |
95 if failoninvalid: | 96 if failoninvalid: |
96 raise hgutil.Abort('file %s should not be in commit list' % f) | 97 raise hgerror.Abort('file %s should not be in commit list' % f) |
97 continue | 98 continue |
98 p, b = meta.split_branch_path(f)[:2] | 99 p, b = meta.split_branch_path(f)[:2] |
99 if b not in branch_batches: | 100 if b not in branch_batches: |
100 branch_batches[b] = [] | 101 branch_batches[b] = [] |
101 if p: | 102 if p: |