D3829: rebase: make dry-run return 1 or 0 according to result
yuja (Yuya Nishihara)
phabricator at mercurial-scm.org
Sat Jun 23 23:12:36 EDT 2018
yuja added a comment.
> - a/hgext/rebase.py +++ b/hgext/rebase.py @@ -825,10 +825,13 @@ **opts) except error.InMemoryMergeConflictsError: ui.status(_('hit a merge conflict\n')) + retcode = 1 else: + retcode = 0 ui.status(_('there will be no conflict, you can rebase\n')) finally: _origrebase(ui, repo, abort=True) + return retcode
`retcode` may be undefined depending on the error type occurred in
`_origrebase()`. Instead, you can simply return 1 and 0 in the `except`
and `else` clauses respectively.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D3829
To: khanchi97, #hg-reviewers
Cc: yuja, mercurial-devel
More information about the Mercurial-devel
mailing list