Mercurial > hg-stable
changeset 23024:ec36969497de
resolve: run happily after conflict-free merge
author | Martin von Zweigbergk <martinvonz@gmail.com> |
---|---|
date | Wed, 08 Oct 2014 22:30:04 -0700 |
parents | 63c9088bebad |
children | b8dd8432395d |
files | mercurial/commands.py tests/test-resolve.t |
diffstat | 2 files changed, 5 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Wed Oct 08 22:16:18 2014 -0700 +++ b/mercurial/commands.py Wed Oct 08 22:30:04 2014 -0700 @@ -5283,7 +5283,7 @@ try: ms = mergemod.mergestate(repo) - if not ms.active() and not show: + if not (ms.active() or repo.dirstate.p2() != nullid) and not show: raise util.Abort( _('resolve command not applicable when not merging'))
--- a/tests/test-resolve.t Wed Oct 08 22:16:18 2014 -0700 +++ b/tests/test-resolve.t Wed Oct 08 22:30:04 2014 -0700 @@ -88,16 +88,14 @@ 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (branch merge, don't forget to commit) -BROKEN: resolve --all should do nothing in merge without conflicts +resolve --all should do nothing in merge without conflicts $ hg resolve --all - abort: resolve command not applicable when not merging - [255] + (no more unresolved files) -BROKEN: resolve -m should do nothing in merge without conflicts +resolve -m should do nothing in merge without conflicts $ hg resolve -m - abort: resolve command not applicable when not merging - [255] + (no more unresolved files) get back to conflicting state