Mercurial > hg
annotate tests/test-convert-baz.t @ 48068:bf8837e3d7ce
dirstate: Remove the flat Rust DirstateMap implementation
Before this changeset we had two Rust implementations of `DirstateMap`.
This removes the "flat" DirstateMap so that the "tree" DirstateMap is always
used when Rust enabled. This simplifies the code a lot, and will enable
(in the next changeset) further removal of a trait abstraction.
This is a performance regression when:
* Rust is enabled, and
* The repository uses the legacy dirstate-v1 file format, and
* For `hg status`, unknown files are not listed (such as with `-mard`)
The regression is about 100 milliseconds for `hg status -mard` on a
semi-large repository (mozilla-central), from ~320ms to ~420ms.
We deem this to be small enough to be worth it.
The new dirstate-v2 is still experimental at this point, but we aim to
stabilize it (though not yet enable it by default for new repositories)
in Mercurial 6.0. Eventually, upgrating repositories to dirsate-v2 will
eliminate this regression (and enable other performance improvements).
# Background
The flat DirstateMap was introduced with the first Rust implementation of the
status algorithm. It works similarly to the previous Python + C one, with a
single `HashMap` that associates file paths to a `DirstateEntry` (where Python
has a dict).
We later added the tree DirstateMap where the root of the tree contains nodes
for files and directories that are directly at the root of the repository,
and nodes for directories can contain child nodes representing the files and
directly that *they* contain directly. The shape of this tree mirrors that of
the working directory in the filesystem. This enables the status algorithm to
traverse this tree in tandem with traversing the filesystem tree, which in
turns enables a more efficient algorithm.
Furthermore, the new dirstate-v2 file format is also based on a tree of the
same shape. The tree DirstateMap can access a dirstate-v2 file without parsing
it: binary data in a single large (possibly memory-mapped) bytes buffer is
traversed on demand. This allows `DirstateMap` creation to take `O(1)` time.
(Mutation works by creating new in-memory nodes with copy-on-write semantics,
and serialization is append-mostly.)
The tradeoff is that for "legacy" repositories that use the dirstate-v1 file
format, parsing that file into a tree DirstateMap takes more time. Profiling
shows that this time is dominated by `HashMap`. For a dirstate containing `F`
files with an average `D` directory depth, the flat DirstateMap does parsing
in `O(F)` number of HashMap operations but the tree DirstateMap in `O(F × D)`
operations, since each node has its own HashMap containing its child nodes.
This slower costs ~140ms on an old snapshot of mozilla-central, and ~80ms
on an old snapshot of the Netbeans repository.
The status algorithm is faster, but with `-mard` (when not listing unknown
files) it is typically not faster *enough* to compensate the slower parsing.
Both Rust implementations are always faster than the Python + C implementation
# Benchmark results
All benchmarks are run on changeset 98c0408324e6, with repositories that use
the dirstate-v1 file format, on a server with 4 CPU cores and 4 CPU threads
(no HyperThreading).
`hg status` benchmarks show wall clock times of the entire command as the
average and standard deviation of serveral runs, collected by
https://github.com/sharkdp/hyperfine and reformated.
Parsing benchmarks are wall clock time of the Rust function that converts a
bytes buffer of the dirstate file into the `DirstateMap` data structure as
used by the status algorithm. A single run each, collected by running
`hg status` this environment variable:
RUST_LOG=hg::dirstate::dirstate_map=trace,hg::dirstate_tree::dirstate_map=trace
Benchmark 1: Rust flat DirstateMap → Rust tree DirstateMap
hg status
mozilla-clean 562.3 ms ± 2.0 ms → 462.5 ms ± 0.6 ms 1.22 ± 0.00 times faster
mozilla-dirty 859.6 ms ± 2.2 ms → 719.5 ms ± 3.2 ms 1.19 ± 0.01 times faster
mozilla-ignored 558.2 ms ± 3.0 ms → 457.9 ms ± 2.9 ms 1.22 ± 0.01 times faster
mozilla-unknowns 859.4 ms ± 5.7 ms → 716.0 ms ± 4.7 ms 1.20 ± 0.01 times faster
netbeans-clean 336.5 ms ± 0.9 ms → 339.5 ms ± 0.4 ms 0.99 ± 0.00 times faster
netbeans-dirty 491.4 ms ± 1.6 ms → 475.1 ms ± 1.2 ms 1.03 ± 0.00 times faster
netbeans-ignored 343.7 ms ± 1.0 ms → 347.8 ms ± 0.4 ms 0.99 ± 0.00 times faster
netbeans-unknowns 484.3 ms ± 1.0 ms → 466.0 ms ± 1.2 ms 1.04 ± 0.00 times faster
hg status -mard
mozilla-clean 317.3 ms ± 0.6 ms → 422.5 ms ± 1.2 ms 0.75 ± 0.00 times faster
mozilla-dirty 315.4 ms ± 0.6 ms → 417.7 ms ± 1.1 ms 0.76 ± 0.00 times faster
mozilla-ignored 314.6 ms ± 0.6 ms → 417.4 ms ± 1.0 ms 0.75 ± 0.00 times faster
mozilla-unknowns 312.9 ms ± 0.9 ms → 417.3 ms ± 1.6 ms 0.75 ± 0.00 times faster
netbeans-clean 212.0 ms ± 0.6 ms → 283.6 ms ± 0.8 ms 0.75 ± 0.00 times faster
netbeans-dirty 211.4 ms ± 1.0 ms → 283.4 ms ± 1.6 ms 0.75 ± 0.01 times faster
netbeans-ignored 211.4 ms ± 0.9 ms → 283.9 ms ± 0.8 ms 0.74 ± 0.01 times faster
netbeans-unknowns 211.1 ms ± 0.6 ms → 283.4 ms ± 1.0 ms 0.74 ± 0.00 times faster
Parsing
mozilla-clean 38.4ms → 177.6ms
mozilla-dirty 38.8ms → 177.0ms
mozilla-ignored 38.8ms → 178.0ms
mozilla-unknowns 38.7ms → 176.9ms
netbeans-clean 16.5ms → 97.3ms
netbeans-dirty 16.5ms → 98.4ms
netbeans-ignored 16.9ms → 97.4ms
netbeans-unknowns 16.9ms → 96.3ms
Benchmark 2: Python + C dirstatemap → Rust tree DirstateMap
hg status
mozilla-clean 1261.0 ms ± 3.6 ms → 461.1 ms ± 0.5 ms 2.73 ± 0.00 times faster
mozilla-dirty 2293.4 ms ± 9.1 ms → 719.6 ms ± 3.6 ms 3.19 ± 0.01 times faster
mozilla-ignored 1240.4 ms ± 2.3 ms → 457.7 ms ± 1.9 ms 2.71 ± 0.00 times faster
mozilla-unknowns 2283.3 ms ± 9.0 ms → 719.7 ms ± 3.8 ms 3.17 ± 0.01 times faster
netbeans-clean 879.7 ms ± 3.5 ms → 339.9 ms ± 0.5 ms 2.59 ± 0.00 times faster
netbeans-dirty 1257.3 ms ± 4.7 ms → 474.6 ms ± 1.6 ms 2.65 ± 0.01 times faster
netbeans-ignored 943.9 ms ± 1.9 ms → 347.3 ms ± 1.1 ms 2.72 ± 0.00 times faster
netbeans-unknowns 1188.1 ms ± 5.0 ms → 465.2 ms ± 2.3 ms 2.55 ± 0.01 times faster
hg status -mard
mozilla-clean 903.2 ms ± 3.6 ms → 423.4 ms ± 2.2 ms 2.13 ± 0.01 times faster
mozilla-dirty 884.6 ms ± 4.5 ms → 417.3 ms ± 1.4 ms 2.12 ± 0.01 times faster
mozilla-ignored 881.9 ms ± 1.3 ms → 417.3 ms ± 0.8 ms 2.11 ± 0.00 times faster
mozilla-unknowns 878.5 ms ± 1.9 ms → 416.4 ms ± 0.9 ms 2.11 ± 0.00 times faster
netbeans-clean 434.9 ms ± 1.8 ms → 284.0 ms ± 0.8 ms 1.53 ± 0.01 times faster
netbeans-dirty 434.1 ms ± 0.8 ms → 283.1 ms ± 0.8 ms 1.53 ± 0.00 times faster
netbeans-ignored 431.7 ms ± 1.1 ms → 283.6 ms ± 1.8 ms 1.52 ± 0.01 times faster
netbeans-unknowns 433.0 ms ± 1.3 ms → 283.5 ms ± 0.7 ms 1.53 ± 0.00 times faster
Differential Revision: https://phab.mercurial-scm.org/D11516
author | Simon Sapin <simon.sapin@octobus.net> |
---|---|
date | Mon, 27 Sep 2021 12:09:15 +0200 |
parents | 561a019c0268 |
children |
rev | line source |
---|---|
22046
7a9cbb315d84
tests: replace exit 80 with #require
Matt Mackall <mpm@selenic.com>
parents:
20117
diff
changeset
|
1 #require baz symlink |
16673
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
2 |
30888
561a019c0268
misc: replace domain of mercurial ML address by mercurial-scm.org
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
22046
diff
changeset
|
3 $ baz my-id "mercurial <mercurial@mercurial-scm.org>" |
6078
ebc23d34102f
convert: added gnu arch (baz) tests
Aleix Conchillo Flaque <aleix@member.fsf.org>
parents:
diff
changeset
|
4 |
16673
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
5 $ echo "[extensions]" >> $HGRCPATH |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
6 $ echo "convert=" >> $HGRCPATH |
6084
a672df805855
Document and fix tla/baz conversion tests
Patrick Mezard <pmezard@gmail.com>
parents:
6078
diff
changeset
|
7 |
16673
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
8 create baz archive |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
9 $ baz make-archive baz@mercurial--convert hg-test-convert-baz |
6078
ebc23d34102f
convert: added gnu arch (baz) tests
Aleix Conchillo Flaque <aleix@member.fsf.org>
parents:
diff
changeset
|
10 |
16673
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
11 initialize baz repo |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
12 $ mkdir baz-repo |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
13 $ cd baz-repo/ |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
14 $ baz init-tree baz@mercurial--convert/baz--test--0 |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
15 $ baz import |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
16 * creating version baz@mercurial--convert/baz--test--0 |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
17 * imported baz@mercurial--convert/baz--test--0 |
6078
ebc23d34102f
convert: added gnu arch (baz) tests
Aleix Conchillo Flaque <aleix@member.fsf.org>
parents:
diff
changeset
|
18 |
16673
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
19 create initial files |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
20 $ echo 'this is a file' > a |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
21 $ baz add a |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
22 $ mkdir src |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
23 $ baz add src |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
24 $ cd src |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
25 $ dd count=1 if=/dev/zero of=b > /dev/null 2> /dev/null |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
26 $ baz add b |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
27 HACK: hide GNU tar-1.22 "tar: The --preserve option is deprecated, use --preserve-permissions --preserve-order instead" |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
28 $ baz commit -s "added a file, src and src/b (binary)" 2>&1 | grep -v '^tar' |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
29 * build pristine tree for baz@mercurial--convert/baz--test--0--base-0 |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
30 * Scanning for full-tree revision: . |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
31 * from import revision: baz@mercurial--convert/baz--test--0--base-0 |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
32 A/ .arch-ids |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
33 A/ src |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
34 A/ src/.arch-ids |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
35 A .arch-ids/a.id |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
36 A a |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
37 A src/.arch-ids/=id |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
38 A src/.arch-ids/b.id |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
39 A src/b |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
40 * update pristine tree (baz@mercurial--convert/baz--test--0--base-0 => baz--test--0--patch-1) |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
41 * committed baz@mercurial--convert/baz--test--0--patch-1 |
6078
ebc23d34102f
convert: added gnu arch (baz) tests
Aleix Conchillo Flaque <aleix@member.fsf.org>
parents:
diff
changeset
|
42 |
16673
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
43 create link file and modify a |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
44 $ ln -s ../a a-link |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
45 $ baz add a-link |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
46 $ echo 'this a modification to a' >> ../a |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
47 $ baz commit -s "added link to a and modify a" |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
48 A src/.arch-ids/a-link.id |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
49 A src/a-link |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
50 M a |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
51 * update pristine tree (baz@mercurial--convert/baz--test--0--patch-1 => baz--test--0--patch-2) |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
52 * committed baz@mercurial--convert/baz--test--0--patch-2 |
6078
ebc23d34102f
convert: added gnu arch (baz) tests
Aleix Conchillo Flaque <aleix@member.fsf.org>
parents:
diff
changeset
|
53 |
16673
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
54 create second link and modify b |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
55 $ ln -s ../a a-link-2 |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
56 $ baz add a-link-2 |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
57 $ dd count=1 seek=1 if=/dev/zero of=b > /dev/null 2> /dev/null |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
58 $ baz commit -s "added second link and modify b" |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
59 A src/.arch-ids/a-link-2.id |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
60 A src/a-link-2 |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
61 Mb src/b |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
62 * update pristine tree (baz@mercurial--convert/baz--test--0--patch-2 => baz--test--0--patch-3) |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
63 * committed baz@mercurial--convert/baz--test--0--patch-3 |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
64 |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
65 b file to link and a-link-2 to regular file |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
66 $ rm -f a-link-2 |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
67 $ echo 'this is now a regular file' > a-link-2 |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
68 $ ln -sf ../a b |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
69 $ baz commit -s "file to link and link to file test" |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
70 fl src/b |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
71 lf src/a-link-2 |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
72 * update pristine tree (baz@mercurial--convert/baz--test--0--patch-3 => baz--test--0--patch-4) |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
73 * committed baz@mercurial--convert/baz--test--0--patch-4 |
6078
ebc23d34102f
convert: added gnu arch (baz) tests
Aleix Conchillo Flaque <aleix@member.fsf.org>
parents:
diff
changeset
|
74 |
16673
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
75 move a-link-2 file and src directory |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
76 $ cd .. |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
77 $ baz mv src/a-link-2 c |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
78 $ baz mv src test |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
79 $ baz commit -s "move and rename a-link-2 file and src directory" |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
80 D/ src/.arch-ids |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
81 A/ test/.arch-ids |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
82 /> src test |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
83 => src/.arch-ids/a-link-2.id .arch-ids/c.id |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
84 => src/a-link-2 c |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
85 => src/.arch-ids/=id test/.arch-ids/=id |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
86 => src/.arch-ids/a-link.id test/.arch-ids/a-link.id |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
87 => src/.arch-ids/b.id test/.arch-ids/b.id |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
88 * update pristine tree (baz@mercurial--convert/baz--test--0--patch-4 => baz--test--0--patch-5) |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
89 * committed baz@mercurial--convert/baz--test--0--patch-5 |
6078
ebc23d34102f
convert: added gnu arch (baz) tests
Aleix Conchillo Flaque <aleix@member.fsf.org>
parents:
diff
changeset
|
90 |
16673
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
91 move and add the moved file again |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
92 $ echo e > e |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
93 $ baz add e |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
94 $ baz commit -s "add e" |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
95 A .arch-ids/e.id |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
96 A e |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
97 * update pristine tree (baz@mercurial--convert/baz--test--0--patch-5 => baz--test--0--patch-6) |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
98 * committed baz@mercurial--convert/baz--test--0--patch-6 |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
99 $ baz mv e f |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
100 $ echo ee > e |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
101 $ baz add e |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
102 $ baz commit -s "move e and recreate it again" |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
103 A .arch-ids/e.id |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
104 A e |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
105 => .arch-ids/e.id .arch-ids/f.id |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
106 => e f |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
107 * update pristine tree (baz@mercurial--convert/baz--test--0--patch-6 => baz--test--0--patch-7) |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
108 * committed baz@mercurial--convert/baz--test--0--patch-7 |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
109 $ cd .. |
6078
ebc23d34102f
convert: added gnu arch (baz) tests
Aleix Conchillo Flaque <aleix@member.fsf.org>
parents:
diff
changeset
|
110 |
16673
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
111 converting baz repo to Mercurial |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
112 $ hg convert baz-repo baz-repo-hg |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
113 initializing destination baz-repo-hg repository |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
114 analyzing tree version baz@mercurial--convert/baz--test--0... |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
115 scanning source... |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
116 sorting... |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
117 converting... |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
118 7 initial import |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
119 6 added a file, src and src/b (binary) |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
120 5 added link to a and modify a |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
121 4 added second link and modify b |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
122 3 file to link and link to file test |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
123 2 move and rename a-link-2 file and src directory |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
124 1 add e |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
125 0 move e and recreate it again |
6078
ebc23d34102f
convert: added gnu arch (baz) tests
Aleix Conchillo Flaque <aleix@member.fsf.org>
parents:
diff
changeset
|
126 |
16673
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
127 $ baz register-archive -d baz@mercurial--convert |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
128 |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
129 $ glog() |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
130 > { |
20117
aa9385f983fa
tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents:
16972
diff
changeset
|
131 > hg log -G --template '{rev} "{desc|firstline}" files: {files}\n' "$@" |
16673
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
132 > } |
6078
ebc23d34102f
convert: added gnu arch (baz) tests
Aleix Conchillo Flaque <aleix@member.fsf.org>
parents:
diff
changeset
|
133 |
16673
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
134 show graph log |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
135 $ glog -R baz-repo-hg |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
136 o 7 "move e and recreate it again" files: e f |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
137 | |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
138 o 6 "add e" files: e |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
139 | |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
140 o 5 "move and rename a-link-2 file and src directory" files: c src/a-link src/a-link-2 src/b test/a-link test/b |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
141 | |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
142 o 4 "file to link and link to file test" files: src/a-link-2 src/b |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
143 | |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
144 o 3 "added second link and modify b" files: src/a-link-2 src/b |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
145 | |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
146 o 2 "added link to a and modify a" files: a src/a-link |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
147 | |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
148 o 1 "added a file, src and src/b (binary)" files: a src/b |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
149 | |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
150 o 0 "initial import" files: |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
151 |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
152 $ hg up -q -R baz-repo-hg |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
153 $ hg -R baz-repo-hg manifest --debug |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
154 c4072c4b72e1cabace081888efa148ee80ca3cbb 644 a |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
155 0201ac32a3a8e86e303dff60366382a54b48a72e 644 c |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
156 1a4a864db0073705a11b1439f563bfa4b46d9246 644 e |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
157 09e0222742fc3f75777fa9d68a5d8af7294cb5e7 644 f |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
158 c0067ba5ff0b7c9a3eb17270839d04614c435623 644 @ test/a-link |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
159 375f4263d86feacdea7e3c27100abd1560f2a973 644 @ test/b |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
160 $ hg -R baz-repo-hg log -r 5 -r 7 -C --debug | grep copies |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
161 copies: c (src/a-link-2) test/a-link (src/a-link) test/b (src/b) |
775a8d33e6f0
tests: unify the last sh tests
Mads Kiilerich <mads@kiilerich.com>
parents:
13765
diff
changeset
|
162 copies: f (e) |