D3829: rebase: make dry-run return 1 or 0 according to result
Yuya Nishihara
yuya at tcha.org
Sat Jun 23 23:12:11 EDT 2018
> --- 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.
More information about the Mercurial-devel
mailing list