Mercurial > hgsubversion
comparison hgsubversion/pushmod.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 | 46523cdfd3b0 |
children | ae572c9be4e6 |
comparison
equal
deleted
inserted
replaced
1554:258fb67fb956 | 1555:cff81f35b31e |
---|---|
1 from mercurial import error as hgerror | |
1 from mercurial import util as hgutil | 2 from mercurial import util as hgutil |
2 | 3 |
3 import svnwrap | 4 import svnwrap |
4 import svnexternals | 5 import svnexternals |
5 import util | 6 import util |
206 ui.traceback() | 207 ui.traceback() |
207 | 208 |
208 if len(e.args) > 0 and e.args[1] in (svnwrap.ERR_FS_TXN_OUT_OF_DATE, | 209 if len(e.args) > 0 and e.args[1] in (svnwrap.ERR_FS_TXN_OUT_OF_DATE, |
209 svnwrap.ERR_FS_CONFLICT, | 210 svnwrap.ERR_FS_CONFLICT, |
210 svnwrap.ERR_FS_ALREADY_EXISTS): | 211 svnwrap.ERR_FS_ALREADY_EXISTS): |
211 raise hgutil.Abort('Outgoing changesets parent is not at ' | 212 raise hgerror.Abort('Outgoing changesets parent is not at ' |
212 'subversion HEAD\n' | 213 'subversion HEAD\n' |
213 '(pull again and rebase on a newer revision)') | 214 '(pull again and rebase on a newer revision)') |
214 elif len(e.args) > 0 and e.args[1] == svnwrap.ERR_REPOS_HOOK_FAILURE: | 215 elif len(e.args) > 0 and e.args[1] == svnwrap.ERR_REPOS_HOOK_FAILURE: |
215 # Special handling for svn hooks blocking error | 216 # Special handling for svn hooks blocking error |
216 raise hgutil.Abort(e.args[0]) | 217 raise hgerror.Abort(e.args[0]) |
217 else: | 218 else: |
218 raise | 219 raise |