Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 20276:6545770bd379
backout: add a message after backout that need manual commit
In some case Backout silently succeeded to back out but left all the change
uncommitted. This may be confusing for user so this changeset add a note
reminding to commit. Other backout case already actively informs the user about
created commit.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Wed, 08 Jan 2014 17:23:26 -0800 |
parents | 2123d27ff75d |
children | 2cfb720592fe |
comparison
equal
deleted
inserted
replaced
20275:2123d27ff75d | 20276:6545770bd379 |
---|---|
463 bheads = repo.branchheads(branch) | 463 bheads = repo.branchheads(branch) |
464 rctx = scmutil.revsingle(repo, hex(parent)) | 464 rctx = scmutil.revsingle(repo, hex(parent)) |
465 if not opts.get('merge') and op1 != node: | 465 if not opts.get('merge') and op1 != node: |
466 try: | 466 try: |
467 ui.setconfig('ui', 'forcemerge', opts.get('tool', '')) | 467 ui.setconfig('ui', 'forcemerge', opts.get('tool', '')) |
468 stats = mergemod.update(repo, parent, True, True, False, node, False) | 468 stats = mergemod.update(repo, parent, True, True, False, |
469 node, False) | |
469 repo.setparents(op1, op2) | 470 repo.setparents(op1, op2) |
470 hg._showstats(repo, stats) | 471 hg._showstats(repo, stats) |
471 if stats[3]: | 472 if stats[3]: |
472 repo.ui.status(_("use 'hg resolve' to retry unresolved file merges\n")) | 473 repo.ui.status(_("use 'hg resolve' to retry unresolved " |
474 "file merges\n")) | |
475 else: | |
476 msg = _("changeset %s backed out, " | |
477 "don't forget to commit.\n") | |
478 ui.status(msg % short(node)) | |
473 return stats[3] > 0 | 479 return stats[3] > 0 |
474 finally: | 480 finally: |
475 ui.setconfig('ui', 'forcemerge', '') | 481 ui.setconfig('ui', 'forcemerge', '') |
476 else: | 482 else: |
477 hg.clean(repo, node, show_stats=False) | 483 hg.clean(repo, node, show_stats=False) |