Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 15619:6c8573dd1b6b
merge: make 'nothing to merge' aborts consistent
Makes the 'nothing to merge' abort messages in commands.py consistent with
those in merge.py. Also makes commands.merge() and merge.update() use hints.
The tests show the changes.
author | Kevin Bullock <kbullock@ringworld.org> |
---|---|
date | Wed, 07 Dec 2011 11:23:01 -0600 |
parents | 0aca2695a110 |
children | 73faa2664909 |
comparison
equal
deleted
inserted
replaced
15618:0aca2695a110 | 15619:6c8573dd1b6b |
---|---|
4040 if len(repo.heads()) > 1: | 4040 if len(repo.heads()) > 1: |
4041 raise util.Abort(_("branch '%s' has one head - " | 4041 raise util.Abort(_("branch '%s' has one head - " |
4042 "please merge with an explicit rev") | 4042 "please merge with an explicit rev") |
4043 % branch, | 4043 % branch, |
4044 hint=_("run 'hg heads' to see all heads")) | 4044 hint=_("run 'hg heads' to see all heads")) |
4045 msg = _('there is nothing to merge') | 4045 msg, hint = _('nothing to merge'), None |
4046 if parent != repo.lookup(branch): | 4046 if parent != repo.lookup(branch): |
4047 msg = _('%s - use "hg update" instead') % msg | 4047 hint = _("use 'hg update' instead") |
4048 raise util.Abort(msg) | 4048 raise util.Abort(msg, hint=hint) |
4049 | 4049 |
4050 if parent not in bheads: | 4050 if parent not in bheads: |
4051 raise util.Abort(_('working directory not at a head revision'), | 4051 raise util.Abort(_('working directory not at a head revision'), |
4052 hint=_("use 'hg update' or merge with an " | 4052 hint=_("use 'hg update' or merge with an " |
4053 "explicit revision")) | 4053 "explicit revision")) |