equal
deleted
inserted
replaced
|
1 #!/bin/sh |
|
2 |
|
3 cat >> readlink.py <<EOF |
|
4 import os |
|
5 import sys |
|
6 |
|
7 for f in sys.argv[1:]: |
|
8 print f, '->', os.readlink(f) |
|
9 EOF |
|
10 |
|
11 hg init a |
|
12 cd a |
|
13 ln -s nothing dangling |
|
14 hg add dangling |
|
15 hg commit -m 'add symlink' -d '0 0' |
|
16 |
|
17 hg tip -v |
|
18 hg manifest --debug |
|
19 echo '% rev 0:' |
|
20 python ../readlink.py dangling |
|
21 |
|
22 rm dangling |
|
23 ln -s void dangling |
|
24 hg commit -m 'change symlink' |
|
25 echo '% rev 1:' |
|
26 python ../readlink.py dangling |
|
27 |
|
28 echo '% modifying link' |
|
29 rm dangling |
|
30 ln -s empty dangling |
|
31 python ../readlink.py dangling |
|
32 |
|
33 echo '% reverting to rev 0:' |
|
34 hg revert -r 0 -a |
|
35 python ../readlink.py dangling |
|
36 |
|
37 echo '% backups:' |
|
38 python ../readlink.py *.orig |
|
39 |
|
40 rm *.orig |
|
41 hg up -C |
|
42 echo '% copies' |
|
43 hg cp -v dangling dangling2 |
|
44 hg st -Cmard |
|
45 python ../readlink.py dangling dangling2 |