comparison tests/test-symlink-basic @ 4274:af4f0d52f948

Add some tests for symlink tracking
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Fri, 23 Mar 2007 23:40:24 -0300
parents
children 6a8e1dd18ba2
comparison
equal deleted inserted replaced
4273:4a1504264261 4274:af4f0d52f948
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