[PATCH 1 of 3] rebase: use one dirstateguard for entire rebase
Yuya Nishihara
yuya at tcha.org
Mon Mar 20 02:35:17 EDT 2017
On Sun, 19 Mar 2017 12:00:56 -0700, Durham Goode wrote:
> # HG changeset patch
> # User Durham Goode <durham at 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.
More information about the Mercurial-devel
mailing list