Mercurial > public > mercurial-scm > hg
comparison mercurial/merge.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 | b0a88bda3381 |
children | efdcce3fd2d5 |
comparison
equal
deleted
inserted
replaced
15618:0aca2695a110 | 15619:6c8573dd1b6b |
---|---|
517 if pa == p2: | 517 if pa == p2: |
518 raise util.Abort(_("merging with a working directory ancestor" | 518 raise util.Abort(_("merging with a working directory ancestor" |
519 " has no effect")) | 519 " has no effect")) |
520 elif pa == p1: | 520 elif pa == p1: |
521 if p1.branch() == p2.branch(): | 521 if p1.branch() == p2.branch(): |
522 raise util.Abort(_("nothing to merge (use 'hg update'" | 522 raise util.Abort(_("nothing to merge"), |
523 " or check 'hg heads')")) | 523 hint=_("use 'hg update' " |
524 "or check 'hg heads'")) | |
524 if not force and (wc.files() or wc.deleted()): | 525 if not force and (wc.files() or wc.deleted()): |
525 raise util.Abort(_("outstanding uncommitted changes " | 526 raise util.Abort(_("outstanding uncommitted changes"), |
526 "(use 'hg status' to list changes)")) | 527 hint=_("use 'hg status' to list changes")) |
527 for s in wc.substate: | 528 for s in wc.substate: |
528 if wc.sub(s).dirty(): | 529 if wc.sub(s).dirty(): |
529 raise util.Abort(_("outstanding uncommitted changes in " | 530 raise util.Abort(_("outstanding uncommitted changes in " |
530 "subrepository '%s'") % s) | 531 "subrepository '%s'") % s) |
531 | 532 |