Debian Codegraph @

tests/test-no-symlinks.t

raw
1 #require no-symlink
2
3 # The following script was used to create the bundle:
4 #
5 # hg init symlinks
6 # cd symlinks
7 # echo a > a
8 # mkdir d
9 # echo b > d/b
10 # ln -s a a.lnk
11 # ln -s d/b d/b.lnk
12 # hg ci -Am t
13 # hg bundle --base null ../test-no-symlinks.hg
14
15 Extract a symlink on a platform not supporting them
16
17 $ hg init t
18 $ cd t
19 $ hg pull -q "$TESTDIR/bundles/test-no-symlinks.hg"
20 $ hg update
21 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
22 $ cat a.lnk && echo
23 a
24 $ cat d/b.lnk && echo
25 d/b
26
27 Copy a symlink and move another
28
29 $ hg copy a.lnk d/a2.lnk
30 $ hg mv d/b.lnk b2.lnk
31 $ hg ci -Am copy
32 $ cat d/a2.lnk && echo
33 a
34 $ cat b2.lnk && echo
35 d/b
36
37 Bundle and extract again
38
39 $ hg bundle --base null ../symlinks.hg
40 2 changesets found
41 $ cd ..
42 $ hg init t2
43 $ cd t2
44 $ hg pull ../symlinks.hg
45 pulling from ../symlinks.hg
46 requesting all changes
47 adding changesets
48 adding manifests
49 adding file changes
50 added 2 changesets with 6 changes to 6 files
51 new changesets d326ae2d01ee:71d85cf3ba90 (2 drafts)
52 (run 'hg update' to get a working copy)
53 $ hg update
54 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
55 $ cat a.lnk && echo
56 a
57 $ cat d/a2.lnk && echo
58 a
59 $ cat b2.lnk && echo
60 d/b