Mercurial > hg
diff hgext/rebase.py @ 46180:b7ccdb52e0f9
rebase: handle the case when nothing to rebase (dry-run)
In dry-run mode, even when there was no rebase in progress it tried
to abort (for context, at the end of dry-run mode we abort the in-memory
performed rebase) because we were not early checking if there was any rebase
started.
Changes in test file reflect the fixed behavior.
Differential Revision: https://phab.mercurial-scm.org/D9659
author | Sushil khanchi <sushilkhanchi97@gmail.com> |
---|---|
date | Sat, 26 Dec 2020 18:26:32 +0530 |
parents | 59fa3890d40a |
children | 24a32dea6955 |
line wrap: on
line diff
--- a/hgext/rebase.py Sat Dec 26 18:04:30 2020 +0530 +++ b/hgext/rebase.py Sat Dec 26 18:26:32 2020 +0530 @@ -1139,13 +1139,16 @@ try: overrides = {(b'rebase', b'singletransaction'): True} with ui.configoverride(overrides, b'rebase'): - _origrebase( + res = _origrebase( ui, repo, action, opts, rbsrt, ) + if res == _nothingtorebase(): + needsabort = False + return res except error.ConflictResolutionRequired: ui.status(_(b'hit a merge conflict\n')) return 1