Mercurial > hg
annotate tests/test-symlinks.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 | 6763913fa175 |
children | b4f83c9e7905 |
rev | line source |
---|---|
22046
7a9cbb315d84
tests: replace exit 80 with #require
Matt Mackall <mpm@selenic.com>
parents:
19157
diff
changeset
|
1 #require symlink |
11798
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
2 |
48068
bf8837e3d7ce
dirstate: Remove the flat Rust DirstateMap implementation
Simon Sapin <simon.sapin@octobus.net>
parents:
47281
diff
changeset
|
3 #testcases dirstate-v1 dirstate-v2 |
47129
93eb6c8035a9
dirstate-tree: Add a dirstate-v1-tree variant of some tests
Simon Sapin <simon.sapin@octobus.net>
parents:
45846
diff
changeset
|
4 |
47281
6763913fa175
dirstate-v2: Add a variant of some tests, that uses the new format
Simon Sapin <simon.sapin@octobus.net>
parents:
47129
diff
changeset
|
5 #if dirstate-v2 |
6763913fa175
dirstate-v2: Add a variant of some tests, that uses the new format
Simon Sapin <simon.sapin@octobus.net>
parents:
47129
diff
changeset
|
6 #require rust |
6763913fa175
dirstate-v2: Add a variant of some tests, that uses the new format
Simon Sapin <simon.sapin@octobus.net>
parents:
47129
diff
changeset
|
7 $ echo '[format]' >> $HGRCPATH |
6763913fa175
dirstate-v2: Add a variant of some tests, that uses the new format
Simon Sapin <simon.sapin@octobus.net>
parents:
47129
diff
changeset
|
8 $ echo 'exp-dirstate-v2=1' >> $HGRCPATH |
6763913fa175
dirstate-v2: Add a variant of some tests, that uses the new format
Simon Sapin <simon.sapin@octobus.net>
parents:
47129
diff
changeset
|
9 #endif |
6763913fa175
dirstate-v2: Add a variant of some tests, that uses the new format
Simon Sapin <simon.sapin@octobus.net>
parents:
47129
diff
changeset
|
10 |
11812
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
11 == tests added in 0.7 == |
1408 | 12 |
11812
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
13 $ hg init test-symlinks-0.7; cd test-symlinks-0.7; |
23462
afa3fbbcabd3
add: use lexists so that broken symbolic links are added
John Coomes <john.coomes@oracle.com>
parents:
22046
diff
changeset
|
14 $ touch foo; ln -s foo bar; ln -s nonexistent baz |
afa3fbbcabd3
add: use lexists so that broken symbolic links are added
John Coomes <john.coomes@oracle.com>
parents:
22046
diff
changeset
|
15 |
afa3fbbcabd3
add: use lexists so that broken symbolic links are added
John Coomes <john.coomes@oracle.com>
parents:
22046
diff
changeset
|
16 import with add and addremove -- symlink walking should _not_ screwup. |
11798
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
17 |
23462
afa3fbbcabd3
add: use lexists so that broken symbolic links are added
John Coomes <john.coomes@oracle.com>
parents:
22046
diff
changeset
|
18 $ hg add |
afa3fbbcabd3
add: use lexists so that broken symbolic links are added
John Coomes <john.coomes@oracle.com>
parents:
22046
diff
changeset
|
19 adding bar |
afa3fbbcabd3
add: use lexists so that broken symbolic links are added
John Coomes <john.coomes@oracle.com>
parents:
22046
diff
changeset
|
20 adding baz |
afa3fbbcabd3
add: use lexists so that broken symbolic links are added
John Coomes <john.coomes@oracle.com>
parents:
22046
diff
changeset
|
21 adding foo |
afa3fbbcabd3
add: use lexists so that broken symbolic links are added
John Coomes <john.coomes@oracle.com>
parents:
22046
diff
changeset
|
22 $ hg forget bar baz foo |
11798
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
23 $ hg addremove |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
24 adding bar |
23462
afa3fbbcabd3
add: use lexists so that broken symbolic links are added
John Coomes <john.coomes@oracle.com>
parents:
22046
diff
changeset
|
25 adding baz |
11798
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
26 adding foo |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
27 |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
28 commit -- the symlink should _not_ appear added to dir state |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
29 |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
30 $ hg commit -m 'initial' |
1408 | 31 |
11798
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
32 $ touch bomb |
1408 | 33 |
11798
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
34 again, symlink should _not_ show up on dir state |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
35 |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
36 $ hg addremove |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
37 adding bomb |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
38 |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
39 Assert screamed here before, should go by without consequence |
1408 | 40 |
11798
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
41 $ hg commit -m 'is there a bug?' |
11812
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
42 $ cd .. |
11798
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
43 |
11812
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
44 |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
45 == fifo & ignore == |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
46 |
11798
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
47 $ hg init test; cd test; |
1408 | 48 |
11798
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
49 $ mkdir dir |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
50 $ touch a.c dir/a.o dir/b.o |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
51 |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
52 test what happens if we want to trick hg |
1408 | 53 |
11798
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
54 $ hg commit -A -m 0 |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
55 adding a.c |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
56 adding dir/a.o |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
57 adding dir/b.o |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
58 $ echo "relglob:*.o" > .hgignore |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
59 $ rm a.c |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
60 $ rm dir/a.o |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
61 $ rm dir/b.o |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
62 $ mkdir dir/a.o |
17492 | 63 $ ln -s nonexistent dir/b.o |
11798
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
64 $ mkfifo a.c |
1408 | 65 |
11798
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
66 it should show a.c, dir/a.o and dir/b.o deleted |
1487
2bc6cd62a29c
fix handling of files of unsupported type in the walk code
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
1408
diff
changeset
|
67 |
11798
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
68 $ hg status |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
69 M dir/b.o |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
70 ! a.c |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
71 ! dir/a.o |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
72 ? .hgignore |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
73 $ hg status a.c |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
74 a.c: unsupported file type (type is fifo) |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
75 ! a.c |
11812
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
76 $ cd .. |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
77 |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
78 |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
79 == symlinks from outside the tree == |
11798
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
80 |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
81 test absolute path through symlink outside repo |
1487
2bc6cd62a29c
fix handling of files of unsupported type in the walk code
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
1408
diff
changeset
|
82 |
11798
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
83 $ p=`pwd` |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
84 $ hg init x |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
85 $ ln -s x y |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
86 $ cd x |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
87 $ touch f |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
88 $ hg add f |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
89 $ hg status "$p"/y/f |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
90 A f |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
91 |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
92 try symlink outside repo to file inside |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
93 |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
94 $ ln -s x/f ../z |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
95 |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
96 this should fail |
2115
fd77b7ee4aac
Fix issue 165: `hg status' with abs path containing a symlink-to-dir fails
Jim Meyering <list+hg@meyering.net>
parents:
1620
diff
changeset
|
97 |
11798
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
98 $ hg status ../z && { echo hg mistakenly exited with status 0; exit 1; } || : |
18450
4f9a52858512
scmutil: localize and improve 'not under root' message
Mads Kiilerich <madski@unity3d.com>
parents:
17492
diff
changeset
|
99 abort: ../z not under root '$TESTTMP/x' |
11812
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
100 $ cd .. |
11798
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
101 |
11812
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
102 |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
103 == cloning symlinks == |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
104 $ hg init clone; cd clone; |
11798
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
105 |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
106 try cloning symlink in a subdir |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
107 1. commit a symlink |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
108 |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
109 $ mkdir -p a/b/c |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
110 $ cd a/b/c |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
111 $ ln -s /path/to/symlink/source demo |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
112 $ cd ../../.. |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
113 $ hg stat |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
114 ? a/b/c/demo |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
115 $ hg commit -A -m 'add symlink in a/b/c subdir' |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
116 adding a/b/c/demo |
2115
fd77b7ee4aac
Fix issue 165: `hg status' with abs path containing a symlink-to-dir fails
Jim Meyering <list+hg@meyering.net>
parents:
1620
diff
changeset
|
117 |
11798
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
118 2. clone it |
4137
26596a6b6518
Create the parent directory when checking out symlinks.
Giorgos Keramidas <keramida@ceid.upatras.gr>
parents:
3988
diff
changeset
|
119 |
11798
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
120 $ cd .. |
11812
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
121 $ hg clone clone clonedest |
11798
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
122 updating to branch default |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
123 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
124 |
11812
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
125 |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
126 == symlink and git diffs == |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
127 |
11798
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
128 git symlink diff |
4137
26596a6b6518
Create the parent directory when checking out symlinks.
Giorgos Keramidas <keramida@ceid.upatras.gr>
parents:
3988
diff
changeset
|
129 |
11812
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
130 $ cd clonedest |
11798
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
131 $ hg diff --git -r null:tip |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
132 diff --git a/a/b/c/demo b/a/b/c/demo |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
133 new file mode 120000 |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
134 --- /dev/null |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
135 +++ b/a/b/c/demo |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
136 @@ -0,0 +1,1 @@ |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
137 +/path/to/symlink/source |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
138 \ No newline at end of file |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
139 $ hg export --git tip > ../sl.diff |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
140 |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
141 import git symlink diff |
5116
35d47b06d4e3
patch: add git symlink support
Brendan Cully <brendan@kublai.com>
parents:
4882
diff
changeset
|
142 |
11798
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
143 $ hg rm a/b/c/demo |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
144 $ hg commit -m'remove link' |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
145 $ hg import ../sl.diff |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
146 applying ../sl.diff |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
147 $ hg diff --git -r 1:tip |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
148 diff --git a/a/b/c/demo b/a/b/c/demo |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
149 new file mode 120000 |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
150 --- /dev/null |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
151 +++ b/a/b/c/demo |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
152 @@ -0,0 +1,1 @@ |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
153 +/path/to/symlink/source |
1ab3d8977bdf
tests: unify test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10775
diff
changeset
|
154 \ No newline at end of file |
11812
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
155 |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
156 == symlinks and addremove == |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
157 |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
158 directory moved and symlinked |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
159 |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
160 $ mkdir foo |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
161 $ touch foo/a |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
162 $ hg ci -Ama |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
163 adding foo/a |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
164 $ mv foo bar |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
165 $ ln -s bar foo |
18625
2cbd27f4f3c4
dirstate: walk returns None for files that have a symlink in their path
Durham Goode <durham@fb.com>
parents:
18450
diff
changeset
|
166 $ hg status |
2cbd27f4f3c4
dirstate: walk returns None for files that have a symlink in their path
Durham Goode <durham@fb.com>
parents:
18450
diff
changeset
|
167 ! foo/a |
2cbd27f4f3c4
dirstate: walk returns None for files that have a symlink in their path
Durham Goode <durham@fb.com>
parents:
18450
diff
changeset
|
168 ? bar/a |
2cbd27f4f3c4
dirstate: walk returns None for files that have a symlink in their path
Durham Goode <durham@fb.com>
parents:
18450
diff
changeset
|
169 ? foo |
11812
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
170 |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
171 now addremove should remove old files |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
172 |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
173 $ hg addremove |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
174 adding bar/a |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
175 adding foo |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
176 removing foo/a |
19157
113681bbef9e
manifestmerge: local unknown, remote created: don't traverse symlinks
Siddharth Agarwal <sid0@fb.com>
parents:
18625
diff
changeset
|
177 |
113681bbef9e
manifestmerge: local unknown, remote created: don't traverse symlinks
Siddharth Agarwal <sid0@fb.com>
parents:
18625
diff
changeset
|
178 commit and update back |
113681bbef9e
manifestmerge: local unknown, remote created: don't traverse symlinks
Siddharth Agarwal <sid0@fb.com>
parents:
18625
diff
changeset
|
179 |
113681bbef9e
manifestmerge: local unknown, remote created: don't traverse symlinks
Siddharth Agarwal <sid0@fb.com>
parents:
18625
diff
changeset
|
180 $ hg ci -mb |
113681bbef9e
manifestmerge: local unknown, remote created: don't traverse symlinks
Siddharth Agarwal <sid0@fb.com>
parents:
18625
diff
changeset
|
181 $ hg up '.^' |
113681bbef9e
manifestmerge: local unknown, remote created: don't traverse symlinks
Siddharth Agarwal <sid0@fb.com>
parents:
18625
diff
changeset
|
182 1 files updated, 0 files merged, 2 files removed, 0 files unresolved |
113681bbef9e
manifestmerge: local unknown, remote created: don't traverse symlinks
Siddharth Agarwal <sid0@fb.com>
parents:
18625
diff
changeset
|
183 $ hg up tip |
113681bbef9e
manifestmerge: local unknown, remote created: don't traverse symlinks
Siddharth Agarwal <sid0@fb.com>
parents:
18625
diff
changeset
|
184 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
113681bbef9e
manifestmerge: local unknown, remote created: don't traverse symlinks
Siddharth Agarwal <sid0@fb.com>
parents:
18625
diff
changeset
|
185 |
11812
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
186 $ cd .. |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
187 |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
188 == root of repository is symlinked == |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
189 |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
190 $ hg init root |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
191 $ ln -s root link |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
192 $ cd root |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
193 $ echo foo > foo |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
194 $ hg status |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
195 ? foo |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
196 $ hg status ../link |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
197 ? foo |
15797
c7a8164c61ab
canonpath: allow canonicalization of non-existant paths
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
12399
diff
changeset
|
198 $ hg add foo |
c7a8164c61ab
canonpath: allow canonicalization of non-existant paths
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
12399
diff
changeset
|
199 $ hg cp foo "$TESTTMP/link/bar" |
c7a8164c61ab
canonpath: allow canonicalization of non-existant paths
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
12399
diff
changeset
|
200 foo has not been committed yet, so no copy data will be stored for bar. |
11812
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
201 $ cd .. |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
202 |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
203 |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
204 $ hg init b |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
205 $ cd b |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
206 $ ln -s nothing dangling |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
207 $ hg commit -m 'commit symlink without adding' dangling |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
208 abort: dangling: file not tracked! |
45846
96ca817ec192
errors: raise InputError when given non-existent paths etc
Martin von Zweigbergk <martinvonz@google.com>
parents:
25472
diff
changeset
|
209 [10] |
11812
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
210 $ hg add dangling |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
211 $ hg commit -m 'add symlink' |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
212 |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
213 $ hg tip -v |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
214 changeset: 0:cabd88b706fc |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
215 tag: tip |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
216 user: test |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
217 date: Thu Jan 01 00:00:00 1970 +0000 |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
218 files: dangling |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
219 description: |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
220 add symlink |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
221 |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
222 |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
223 $ hg manifest --debug |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
224 2564acbe54bbbedfbf608479340b359f04597f80 644 @ dangling |
25472
4d2b9b304ad0
tests: drop explicit $TESTDIR from executables
Matt Mackall <mpm@selenic.com>
parents:
23462
diff
changeset
|
225 $ readlink.py dangling |
11812
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
226 dangling -> nothing |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
227 |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
228 $ rm dangling |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
229 $ ln -s void dangling |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
230 $ hg commit -m 'change symlink' |
25472
4d2b9b304ad0
tests: drop explicit $TESTDIR from executables
Matt Mackall <mpm@selenic.com>
parents:
23462
diff
changeset
|
231 $ readlink.py dangling |
11812
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
232 dangling -> void |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
233 |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
234 |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
235 modifying link |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
236 |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
237 $ rm dangling |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
238 $ ln -s empty dangling |
25472
4d2b9b304ad0
tests: drop explicit $TESTDIR from executables
Matt Mackall <mpm@selenic.com>
parents:
23462
diff
changeset
|
239 $ readlink.py dangling |
11812
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
240 dangling -> empty |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
241 |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
242 |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
243 reverting to rev 0: |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
244 |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
245 $ hg revert -r 0 -a |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
246 reverting dangling |
25472
4d2b9b304ad0
tests: drop explicit $TESTDIR from executables
Matt Mackall <mpm@selenic.com>
parents:
23462
diff
changeset
|
247 $ readlink.py dangling |
11812
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
248 dangling -> nothing |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
249 |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
250 |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
251 backups: |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
252 |
25472
4d2b9b304ad0
tests: drop explicit $TESTDIR from executables
Matt Mackall <mpm@selenic.com>
parents:
23462
diff
changeset
|
253 $ readlink.py *.orig |
11812
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
254 dangling.orig -> empty |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
255 $ rm *.orig |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
256 $ hg up -C |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
257 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
258 |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
259 copies |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
260 |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
261 $ hg cp -v dangling dangling2 |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
262 copying dangling to dangling2 |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
263 $ hg st -Cmard |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
264 A dangling2 |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
265 dangling |
25472
4d2b9b304ad0
tests: drop explicit $TESTDIR from executables
Matt Mackall <mpm@selenic.com>
parents:
23462
diff
changeset
|
266 $ readlink.py dangling dangling2 |
11812
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
267 dangling -> void |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
268 dangling2 -> void |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
269 |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
270 |
12399
4fee1fd3de9a
tests: added a short description to issue numbers
Martin Geisler <mg@aragost.com>
parents:
12316
diff
changeset
|
271 Issue995: hg copy -A incorrectly handles symbolic links |
11812
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
272 |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
273 $ hg up -C |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
274 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
275 $ mkdir dir |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
276 $ ln -s dir dirlink |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
277 $ hg ci -qAm 'add dirlink' |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
278 $ mkdir newdir |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
279 $ mv dir newdir/dir |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
280 $ mv dirlink newdir/dirlink |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
281 $ hg mv -A dirlink newdir/dirlink |
6f12f53ae795
tests: merge all 4 test-symlink* into test-symlinks
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
11798
diff
changeset
|
282 |
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
16350
diff
changeset
|
283 $ cd .. |