This is an archive of the discontinued Mercurial Phabricator instance.

rebase: use one dirstateguard for when using rebase.singletransaction
AbandonedPublic

Authored by durham on Jul 12 2017, 1:56 PM.

Details

Reviewers
martinvonz
Group Reviewers
Restricted Project
Summary

This was previously landed as 2519994d25ca but backed out in b63351f6a2 because
it broke hooks mid-rebase and caused conflict resolution data loss in the event
of unexpected exceptions. This new version adds the behavior back but behind a
config flag, since the performance improvement is notable in large repositories.

The old commit message was:

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.

In a large repo, rebasing 27 commits is sped up by about 20%.

I believe the test changes are because us touching the dirstate gave the
transaction something to actually rollback.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

durham created this revision.Jul 12 2017, 1:56 PM
durham added reviewers: Restricted Project, martinvonz.Jul 12 2017, 1:58 PM
durham added 1 blocking reviewer(s): martinvonz.
durham removed 1 blocking reviewer(s): martinvonz.Jul 12 2017, 2:00 PM
martinvonz accepted this revision.Jul 12 2017, 4:27 PM
martinvonz added inline comments.
tests/test-rebase-base.t
400

I haven't seen this style of starting a comment with '-' elsewhere, so it feels more confusing than helpful. I can see the point of doing it to indicate intra-testcase comments (as opposed to the per-testcase comments like on line 382), but only if we try to do it somewhat consistently. Should I drop it in flight or do you want us to start using this style?

This revision is now accepted and ready to land.Jul 12 2017, 4:27 PM
phillco added inline comments.
tests/test-rebase-base.t
400

It'd be nice to have such a style, I think.

martinvonz added inline comments.Jul 12 2017, 4:47 PM
tests/test-rebase-base.t
400

I'd be fine with that, but I don't want to decide it right now, so I've dropped the '- ' in flight and queued this.

durham abandoned this revision.Jul 18 2017, 11:15 AM

Update sent as https://phab.mercurial-scm.org/D134 . Not sure how to get it to update this diff instead, so abandoning.