# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 1527976285 -19800 # Node ID 838fc71ddb9c9031ea3d3575ac44bae174d2d70c # Parent 31348460646119591434ffdc0dadfd45e866d30e next-prev: replace the error hint to mention about `--merge` flag diff -r 313484606461 -r 838fc71ddb9c hgext3rd/evolve/__init__.py --- a/hgext3rd/evolve/__init__.py Sun Jun 03 03:13:47 2018 +0530 +++ b/hgext3rd/evolve/__init__.py Sun Jun 03 03:21:25 2018 +0530 @@ -973,7 +973,12 @@ repo.ui.write(_('hg bookmark %s -r %s;\n') % (bookmark, target)) else: - ret = hg.updatetotally(repo.ui, repo, target.node(), None) + try: + ret = hg.updatetotally(repo.ui, repo, target.node(), None) + except error.Abort as exc: + # replace the hint to mention about --merge option + exc.hint = _('do you want --merge?') + raise if not ret: tr = lock = None try: @@ -1208,7 +1213,13 @@ if shouldmove: ui.write(_('hg bookmark %s -r %s;\n') % (bm, children)) else: - ret = hg.updatetotally(ui, repo, children.node(), None) + try: + ret = hg.updatetotally(ui, repo, children.node(), None) + except error.Abort as exc: + # replace the hint to mention about --merge option + exc.hint = _('do you want --merge?') + raise + if not ret: lock = tr = None try: diff -r 313484606461 -r 838fc71ddb9c tests/test-prev-next.t --- a/tests/test-prev-next.t Sun Jun 03 03:13:47 2018 +0530 +++ b/tests/test-prev-next.t Sun Jun 03 03:21:25 2018 +0530 @@ -425,7 +425,7 @@ $ echo bar > bar $ hg prev abort: conflicting changes - (commit or update --clean to discard changes) + (do you want --merge?) [255] $ echo hi > bar @@ -437,5 +437,5 @@ $ hg next abort: conflicting changes - (commit or update --clean to discard changes) + (do you want --merge?) [255]