[PATCH] rebase: only clear rebase status after the rebase transaction has completed

Augie Fackler raf at durin42.com
Fri Dec 4 13:48:43 CST 2015


On Thu, Dec 03, 2015 at 08:37:33AM -0800, Laurent Charignon wrote:
> # HG changeset patch
> # User Laurent Charignon <lcharignon at fb.com>
> # Date 1449160280 28800
> #      Thu Dec 03 08:31:20 2015 -0800
> # Node ID 44bf2c5e5e9676c6709698df6eff1890c9947dfb
> # Parent  91905c0c47377520eebdedcfa6bcb73b77e24e0c
> rebase: only clear rebase status after the rebase transaction has completed

Queued, thanks

>
> In 405320cd6198, I made the mistake of moving the step "clearing the status
> after a rebase" to inside the rebase transaction.
> This was wrong, since we don't want to clear the status (and the rebase state)
> if something went wrong during the transaction: if something goes wrong we
> want to keep the rebase state to be able to abort.
> It broke rebase with evolve + inhibit.
>
> diff --git a/hgext/rebase.py b/hgext/rebase.py
> --- a/hgext/rebase.py
> +++ b/hgext/rebase.py
> @@ -563,10 +563,10 @@ def rebase(ui, repo, **opts):
>                  if activebookmark not in repo._bookmarks:
>                      # active bookmark was divergent one and has been deleted
>                      activebookmark = None
> -            clearstatus(repo)
>              tr.close()
>          finally:
>              release(tr)
> +        clearstatus(repo)
>
>          ui.note(_("rebase completed\n"))
>          util.unlinkpath(repo.sjoin('undo'), ignoremissing=True)
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list