annotate tests/test-rebase-dry-run.t @ 52176:72bc29f01570

revlog: add glue to use a pure-Rust VFS This will save us a lot of calling back into Python, which is always horribly expensive. We are now faster in all benchmarked cases except for `log --patch` specifically on mozilla-try. Fixing this will happen in a later patch. ``` ### data-env-vars.name = mercurial-devel-2024-03-22-ds2-pnm # benchmark.name = hg.command.cat # bin-env-vars.hg.flavor = rust # bin-env-vars.hg.py-re2-module = default # benchmark.variants.files = all-root # benchmark.variants.output = plain # benchmark.variants.rev = tip e679697a6ca4: 1.760765 ~~~~~ 5559d7e63ec3: 1.555513 (-11.66%, -0.21) ### data-env-vars.name = mozilla-try-2024-03-26-ds2-pnm # benchmark.name = hg.command.cat # bin-env-vars.hg.flavor = rust # bin-env-vars.hg.py-re2-module = default # benchmark.variants.files = all-root # benchmark.variants.output = plain # benchmark.variants.rev = tip e679697a6ca4: 62.848869 ~~~~~ 5559d7e63ec3: 58.113051 (-7.54%, -4.74) ### data-env-vars.name = mozilla-try-2024-03-26-ds2-pnm # benchmark.name = hg.command.log # bin-env-vars.hg.flavor = rust # bin-env-vars.hg.py-re2-module = default # benchmark.variants.limit-rev = 10 # benchmark.variants.patch = yes # benchmark.variants.rev = none e679697a6ca4: 3.173532 ~~~~~ 5559d7e63ec3: 3.543591 (+11.66%, +0.37) ### data-env-vars.name = mozilla-try-2024-03-26-ds2-pnm # benchmark.name = hg.command.log # bin-env-vars.hg.flavor = rust # bin-env-vars.hg.py-re2-module = default # benchmark.variants.limit-rev = 1000 # benchmark.variants.patch = no # benchmark.variants.rev = none e679697a6ca4: 1.214698 ~~~~~ 5559d7e63ec3: 1.192478 (-1.83%, -0.02) ### data-env-vars.name = mozilla-unified-2024-03-22-ds2-pnm # benchmark.name = hg.command.cat # bin-env-vars.hg.flavor = rust # bin-env-vars.hg.py-re2-module = default # benchmark.variants.files = all-root # benchmark.variants.output = plain # benchmark.variants.rev = tip e679697a6ca4: 56.205474 ~~~~~ 5559d7e63ec3: 51.520074 (-8.34%, -4.69) ### data-env-vars.name = mozilla-unified-2024-03-22-ds2-pnm # benchmark.name = hg.command.log # bin-env-vars.hg.flavor = rust # bin-env-vars.hg.py-re2-module = default # benchmark.variants.limit-rev = 10 # benchmark.variants.patch = yes # benchmark.variants.rev = none e679697a6ca4: 2.105419 ~~~~~ 5559d7e63ec3: 2.051849 (-2.54%, -0.05) ### data-env-vars.name = mozilla-unified-2024-03-22-ds2-pnm # benchmark.name = hg.command.log # bin-env-vars.hg.flavor = rust # bin-env-vars.hg.py-re2-module = default # benchmark.variants.limit-rev = 1000 # benchmark.variants.patch = no # benchmark.variants.rev = none e679697a6ca4: 0.309960 ~~~~~ 5559d7e63ec3: 0.299035 (-3.52%, -0.01) ### data-env-vars.name = tryton-public-2024-03-22-ds2-pnm # benchmark.name = hg.command.cat # bin-env-vars.hg.flavor = rust # bin-env-vars.hg.py-re2-module = default # benchmark.variants.files = all-root # benchmark.variants.output = plain # benchmark.variants.rev = tip e679697a6ca4: 1.849832 ~~~~~ 5559d7e63ec3: 1.805076 (-2.42%, -0.04) ### data-env-vars.name = tryton-public-2024-03-22-ds2-pnm # benchmark.name = hg.command.log # bin-env-vars.hg.flavor = rust # bin-env-vars.hg.py-re2-module = default # benchmark.variants.limit-rev = 10 # benchmark.variants.patch = yes # benchmark.variants.rev = none e679697a6ca4: 0.289521 ~~~~~ 5559d7e63ec3: 0.279889 (-3.33%, -0.01) ### data-env-vars.name = tryton-public-2024-03-22-ds2-pnm # benchmark.name = hg.command.log # bin-env-vars.hg.flavor = rust # bin-env-vars.hg.py-re2-module = default # benchmark.variants.limit-rev = 1000 # benchmark.variants.patch = no # benchmark.variants.rev = none e679697a6ca4: 0.332270 ~~~~~ 5559d7e63ec3: 0.323324 (-2.69%, -0.01) ```
author Raphaël Gomès <rgomes@octobus.net>
date Mon, 29 Jul 2024 20:39:34 +0200
parents 9f33d12f6f48
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
50339
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
1 ======================
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
2 rebase --dry-run tests
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
3 ======================
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
4
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
5 Test behavior associated with `hg rebase --dry-run`
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
6
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
7 Setup
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
8 =====
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
9
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
10 $ hg init r1
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
11 $ cd r1
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
12 $ echo one > f01.txt
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
13 $ echo two > f02.txt
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
14 $ echo three > f03.txt
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
15 $ hg add
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
16 adding f01.txt
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
17 adding f02.txt
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
18 adding f03.txt
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
19 $ hg ci -m 'ci-1' f01.txt f02.txt f03.txt
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
20 $ hg book base; hg book -i
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
21 $ echo add-to-one >> f01.txt
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
22 $ hg ci -m 'br-1' f01.txt
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
23 $ hg book branch-1; hg book -i
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
24 $ hg up base; hg book -i
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
25 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
26 (activating bookmark base)
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
27 $ echo add-to-two >> f02.txt
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
28 $ hg ci -m 'br-2' f02.txt
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
29 created new head
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
30 $ hg book branch-2; hg book -i
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
31 $ hg up branch-1; hg book -i
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
32 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
33 (activating bookmark branch-1)
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
34 $ hg log -G
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
35 o changeset: 2:d408211b0a6f
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
36 | bookmark: branch-2
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
37 | tag: tip
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
38 | parent: 0:99418d161ee0
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
39 | user: test
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
40 | date: Thu Jan 01 00:00:00 1970 +0000
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
41 | summary: br-2
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
42 |
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
43 | @ changeset: 1:ab62441498e5
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
44 |/ bookmark: branch-1
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
45 | user: test
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
46 | date: Thu Jan 01 00:00:00 1970 +0000
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
47 | summary: br-1
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
48 |
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
49 o changeset: 0:99418d161ee0
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
50 bookmark: base
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
51 user: test
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
52 date: Thu Jan 01 00:00:00 1970 +0000
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
53 summary: ci-1
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
54
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
55
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
56
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
57 Check the working copy changes do not get wiped out
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
58 ===================================================
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
59
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
60 $ echo add-to-three >> f03.txt
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
61
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
62 f03 is modified
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
63
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
64 $ hg st
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
65 M f03.txt
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
66 $ hg diff
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
67 diff -r ab62441498e5 f03.txt
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
68 --- a/f03.txt Thu Jan 01 00:00:00 1970 +0000
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
69 +++ b/f03.txt Thu Jan 01 00:00:00 1970 +0000
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
70 @@ -1,1 +1,2 @@
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
71 three
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
72 +add-to-three
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
73
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
74
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
75 $ hg rebase -v -n -s branch-2 -d branch-1 --config extensions.rebase=
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
76 starting dry-run rebase; repository will not be changed
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
77 rebasing 2:d408211b0a6f branch-2 tip "br-2"
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
78 resolving manifests
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
79 getting f02.txt
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
80 committing files:
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
81 f02.txt
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
82 committing manifest
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
83 committing changelog
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
84 rebase merging completed
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
85 dry-run rebase completed successfully; run without -n/--dry-run to perform this rebase
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
86
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
87 f03 changes are lost
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
88
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
89 $ hg st
50340
9f33d12f6f48 rebase: do not cleanup the working copy when --dry-run is used (issue6802)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50339
diff changeset
90 M f03.txt
50339
b469c5ceaa85 rebase: add a test showing that --dry-run wipes working copy changes
Raphaël Gomès <rgomes@octobus.net>
parents:
diff changeset
91 $ hg diff
50340
9f33d12f6f48 rebase: do not cleanup the working copy when --dry-run is used (issue6802)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50339
diff changeset
92 diff -r ab62441498e5 f03.txt
9f33d12f6f48 rebase: do not cleanup the working copy when --dry-run is used (issue6802)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50339
diff changeset
93 --- a/f03.txt Thu Jan 01 00:00:00 1970 +0000
9f33d12f6f48 rebase: do not cleanup the working copy when --dry-run is used (issue6802)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50339
diff changeset
94 +++ b/f03.txt Thu Jan 01 00:00:00 1970 +0000
9f33d12f6f48 rebase: do not cleanup the working copy when --dry-run is used (issue6802)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50339
diff changeset
95 @@ -1,1 +1,2 @@
9f33d12f6f48 rebase: do not cleanup the working copy when --dry-run is used (issue6802)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50339
diff changeset
96 three
9f33d12f6f48 rebase: do not cleanup the working copy when --dry-run is used (issue6802)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 50339
diff changeset
97 +add-to-three