On Sun, 19 Mar 2017 12:00:56 -0700, Durham Goode wrote:
> # HG changeset patch
> # User Durham Goode <dur...@fb.com>
> # Date 1489949655 25200
> #      Sun Mar 19 11:54:15 2017 -0700
> # Node ID c2f68e8cd96f92c2fa240fe04e541c14c1bad3d8
> # Parent  75e4bae56068bec4f965773a2d5f4d272a8dc5b0
> rebase: use one dirstateguard for entire rebase
> 
> Recently we switched rebases to run the entire rebase inside a single
> transaction, which dramatically improved the speed of rebases in repos with
> large working copies. Let's also move the dirstate into a single dirstateguard
> to get the same benefits. This let's us avoid serializing the dirstate after
> each commit.

This seems good for consistency. Queued, thanks.

> +            try:
> +                newnode = concludenode(repo, revtoreuse, p1, self.external,
> +                                       commitmsg=commitmsg,
> +                                       extrafn=_makeextrafn(self.extrafns),
> +                                       editor=editor,
> +                                       keepbranches=self.keepbranchesf,
> +                                       date=self.date)
> +                dsguard.close()
> +                release(dsguard)
> +            except error.InterventionRequired:
> +                dsguard.close()
> +                release(dsguard)
> +                raise
> +            except Exception:
> +                release(dsguard)
> +                raise

could be "finally: release(dsguard)".

> +            dsguard = dirstateguard.dirstateguard(repo, 'rebase')
>              try:
>                  rbsrt._performrebase(tr)
> +                dsguard.close()
> +                release(dsguard)
>              except error.InterventionRequired:
> +                dsguard.close()
> +                release(dsguard)
>                  tr.close()
>                  raise
> +            except Exception:
> +                release(dsguard)
> +                raise

this, too.
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to