comparison tests/test-rebase-conflicts.t @ 31226:cf8ad0e6c0e4

rebase: move actual rebase into a single transaction Previously, rebasing would open several transaction over the course of rebasing several commits. Opening a transaction can have notable overhead (like copying the dirstate) which can add up when rebasing many commits. This patch adds a single large transaction around the actual commit rebase operation, with a catch for intervention which serializes the current state if we need to drop back to the terminal for user intervention. Amazingly, almost all the tests seem to pass. On large repos with large working copies, this can speed up rebasing 7 commits by 25%. I'd expect the percentage to be a bit larger for rebasing even more commits. There are minor test changes because we're rolling back the entire transaction during unexpected exceptions instead of just stopping mid-rebase, so there's no more backup bundle. It also leave an unknown file in the working copy, since our clean up 'hg update' doesn't delete unknown files.
author Durham Goode <durham@fb.com>
date Tue, 07 Mar 2017 16:27:32 -0800
parents 749b057b01f3
children 27e67cfea27f a5abaa81fad6
comparison
equal deleted inserted replaced
31225:749b057b01f3 31226:cf8ad0e6c0e4
223 ignoring null merge rebase of 4 223 ignoring null merge rebase of 4
224 ignoring null merge rebase of 6 224 ignoring null merge rebase of 6
225 ignoring null merge rebase of 8 225 ignoring null merge rebase of 8
226 rebasing 9:e31216eec445 "more changes to f1" 226 rebasing 9:e31216eec445 "more changes to f1"
227 future parents are 2 and -1 227 future parents are 2 and -1
228 rebase status stored
229 update to 2:4bc80088dc6b 228 update to 2:4bc80088dc6b
230 resolving manifests 229 resolving manifests
231 branchmerge: False, force: True, partial: False 230 branchmerge: False, force: True, partial: False
232 ancestor: d79e2059b5c0+, local: d79e2059b5c0+, remote: 4bc80088dc6b 231 ancestor: d79e2059b5c0+, local: d79e2059b5c0+, remote: 4bc80088dc6b
233 f2.txt: other deleted -> r 232 f2.txt: other deleted -> r
249 committing manifest 248 committing manifest
250 committing changelog 249 committing changelog
251 rebased as 19c888675e13 250 rebased as 19c888675e13
252 rebasing 10:2f2496ddf49d "merge" (tip) 251 rebasing 10:2f2496ddf49d "merge" (tip)
253 future parents are 11 and 7 252 future parents are 11 and 7
254 rebase status stored
255 already in target 253 already in target
256 merge against 10:2f2496ddf49d 254 merge against 10:2f2496ddf49d
257 detach base 9:e31216eec445 255 detach base 9:e31216eec445
258 searching for copies back to rev 3 256 searching for copies back to rev 3
259 unmatched files in other (from topological common ancestor): 257 unmatched files in other (from topological common ancestor):
267 f1.txt 265 f1.txt
268 committing manifest 266 committing manifest
269 committing changelog 267 committing changelog
270 rebased as 2a7f09cac94c 268 rebased as 2a7f09cac94c
271 rebase merging completed 269 rebase merging completed
270 rebase status stored
272 update back to initial working directory parent 271 update back to initial working directory parent
273 resolving manifests 272 resolving manifests
274 branchmerge: False, force: False, partial: False 273 branchmerge: False, force: False, partial: False
275 ancestor: 2a7f09cac94c, local: 2a7f09cac94c+, remote: d79e2059b5c0 274 ancestor: 2a7f09cac94c, local: 2a7f09cac94c+, remote: d79e2059b5c0
276 f1.txt: other deleted -> r 275 f1.txt: other deleted -> r