Mercurial > hg
view 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 |
line wrap: on
line source
====================== rebase --dry-run tests ====================== Test behavior associated with `hg rebase --dry-run` Setup ===== $ hg init r1 $ cd r1 $ echo one > f01.txt $ echo two > f02.txt $ echo three > f03.txt $ hg add adding f01.txt adding f02.txt adding f03.txt $ hg ci -m 'ci-1' f01.txt f02.txt f03.txt $ hg book base; hg book -i $ echo add-to-one >> f01.txt $ hg ci -m 'br-1' f01.txt $ hg book branch-1; hg book -i $ hg up base; hg book -i 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (activating bookmark base) $ echo add-to-two >> f02.txt $ hg ci -m 'br-2' f02.txt created new head $ hg book branch-2; hg book -i $ hg up branch-1; hg book -i 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (activating bookmark branch-1) $ hg log -G o changeset: 2:d408211b0a6f | bookmark: branch-2 | tag: tip | parent: 0:99418d161ee0 | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: br-2 | | @ changeset: 1:ab62441498e5 |/ bookmark: branch-1 | user: test | date: Thu Jan 01 00:00:00 1970 +0000 | summary: br-1 | o changeset: 0:99418d161ee0 bookmark: base user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: ci-1 Check the working copy changes do not get wiped out =================================================== $ echo add-to-three >> f03.txt f03 is modified $ hg st M f03.txt $ hg diff diff -r ab62441498e5 f03.txt --- a/f03.txt Thu Jan 01 00:00:00 1970 +0000 +++ b/f03.txt Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +1,2 @@ three +add-to-three $ hg rebase -v -n -s branch-2 -d branch-1 --config extensions.rebase= starting dry-run rebase; repository will not be changed rebasing 2:d408211b0a6f branch-2 tip "br-2" resolving manifests getting f02.txt committing files: f02.txt committing manifest committing changelog rebase merging completed dry-run rebase completed successfully; run without -n/--dry-run to perform this rebase f03 changes are lost $ hg st M f03.txt $ hg diff diff -r ab62441498e5 f03.txt --- a/f03.txt Thu Jan 01 00:00:00 1970 +0000 +++ b/f03.txt Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +1,2 @@ three +add-to-three