Mercurial > hg
comparison mercurial/repair.py @ 26587:56b2bcea2529
error: get Abort from 'error' instead of 'util'
The home of 'Abort' is 'error' not 'util' however, a lot of code seems to be
confused about that and gives all the credit to 'util' instead of the
hardworking 'error'. In a spirit of equity, we break the cycle of injustice and
give back to 'error' the respect it deserves. And screw that 'util' poser.
For great justice.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Thu, 08 Oct 2015 12:55:45 -0700 |
parents | eb21b6679dc6 |
children | bcace0fbb4c8 |
comparison
equal
deleted
inserted
replaced
26586:d51c658d3f04 | 26587:56b2bcea2529 |
---|---|
13 from .i18n import _ | 13 from .i18n import _ |
14 from .node import short | 14 from .node import short |
15 from . import ( | 15 from . import ( |
16 bundle2, | 16 bundle2, |
17 changegroup, | 17 changegroup, |
18 error, | |
18 exchange, | 19 exchange, |
19 util, | 20 util, |
20 ) | 21 ) |
21 | 22 |
22 def _bundle(repo, bases, heads, node, suffix, compress=True): | 23 def _bundle(repo, bases, heads, node, suffix, compress=True): |
154 | 155 |
155 curtr = repo.currenttransaction() | 156 curtr = repo.currenttransaction() |
156 if curtr is not None: | 157 if curtr is not None: |
157 del curtr # avoid carrying reference to transaction for nothing | 158 del curtr # avoid carrying reference to transaction for nothing |
158 msg = _('programming error: cannot strip from inside a transaction') | 159 msg = _('programming error: cannot strip from inside a transaction') |
159 raise util.Abort(msg, hint=_('contact your extension maintainer')) | 160 raise error.Abort(msg, hint=_('contact your extension maintainer')) |
160 | 161 |
161 tr = repo.transaction("strip") | 162 tr = repo.transaction("strip") |
162 offset = len(tr.entries) | 163 offset = len(tr.entries) |
163 | 164 |
164 try: | 165 try: |