Mercurial > hg
comparison mercurial/destutil.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 | 2aeeef1dc9a5 |
children | 45b86dbabbda |
comparison
equal
deleted
inserted
replaced
26586:d51c658d3f04 | 26587:56b2bcea2529 |
---|---|
6 # GNU General Public License version 2 or any later version. | 6 # GNU General Public License version 2 or any later version. |
7 | 7 |
8 from .i18n import _ | 8 from .i18n import _ |
9 from . import ( | 9 from . import ( |
10 error, | 10 error, |
11 util, | |
12 obsolete, | 11 obsolete, |
13 ) | 12 ) |
14 | 13 |
15 def destupdate(repo): | 14 def destupdate(repo): |
16 """destination for bare update operation | 15 """destination for bare update operation |
24 node = repo.branchtip(wc.branch()) | 23 node = repo.branchtip(wc.branch()) |
25 except error.RepoLookupError: | 24 except error.RepoLookupError: |
26 if wc.branch() == 'default': # no default branch! | 25 if wc.branch() == 'default': # no default branch! |
27 node = repo.lookup('tip') # update to tip | 26 node = repo.lookup('tip') # update to tip |
28 else: | 27 else: |
29 raise util.Abort(_("branch %s not found") % wc.branch()) | 28 raise error.Abort(_("branch %s not found") % wc.branch()) |
30 | 29 |
31 if p1.obsolete() and not p1.children(): | 30 if p1.obsolete() and not p1.children(): |
32 # allow updating to successors | 31 # allow updating to successors |
33 successors = obsolete.successorssets(repo, p1.node()) | 32 successors = obsolete.successorssets(repo, p1.node()) |
34 | 33 |