In dry-run mode, if there is no conflict return 0, if any then return 1
Details
Details
- Reviewers
pulkit - Group Reviewers
hg-reviewers - Commits
- rHGe6b643ccf87d: rebase: make dry-run return 1 or 0 according to result
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
Comment Actions
- 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.