Mercurial > hg-stable
changeset 38448:e6b643ccf87d
rebase: make dry-run return 1 or 0 according to result
In dry-run mode, if there is no conflict return 0, if any then return 1
Differential Revision: https://phab.mercurial-scm.org/D3829
author | Sushil khanchi <sushilkhanchi97@gmail.com> |
---|---|
date | Sat, 23 Jun 2018 08:59:18 +0530 |
parents | 36edfbac7281 |
children | a0c3d83d5f04 |
files | hgext/rebase.py tests/test-rebase-inmemory.t |
diffstat | 2 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/rebase.py Fri Mar 24 00:33:35 2017 -0400 +++ b/hgext/rebase.py Sat Jun 23 08:59:18 2018 +0530 @@ -825,8 +825,10 @@ **opts) except error.InMemoryMergeConflictsError: ui.status(_('hit a merge conflict\n')) + return 1 else: ui.status(_('there will be no conflict, you can rebase\n')) + return 0 finally: _origrebase(ui, repo, abort=True) elif inmemory:
--- a/tests/test-rebase-inmemory.t Fri Mar 24 00:33:35 2017 -0400 +++ b/tests/test-rebase-inmemory.t Sat Jun 23 08:59:18 2018 +0530 @@ -287,6 +287,7 @@ rollback completed hit a merge conflict rebase aborted + [1] $ hg diff $ hg status $ hg log -G --template "{rev}:{short(node)} {person(author)}\n{firstline(desc)} {topic}\n\n" @@ -322,3 +323,4 @@ merging e hit a merge conflict rebase aborted + [1]