Mercurial > hg > mercurial-crew-with-dirclash
annotate tests/test-symlink-basic @ 4528:85a69f4d1e80
test-config-case: print only the Section we're interested in.
This allows us to add additional settings to the global hgrc file
created by run-tests.py without breaking this test.
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Fri, 08 Jun 2007 23:49:12 -0300 |
parents | af4f0d52f948 |
children | 6a8e1dd18ba2 |
rev | line source |
---|---|
4264
af4f0d52f948
Add some tests for symlink tracking
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
1 #!/bin/sh |
af4f0d52f948
Add some tests for symlink tracking
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
2 |
af4f0d52f948
Add some tests for symlink tracking
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
3 cat >> readlink.py <<EOF |
af4f0d52f948
Add some tests for symlink tracking
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
4 import os |
af4f0d52f948
Add some tests for symlink tracking
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
5 import sys |
af4f0d52f948
Add some tests for symlink tracking
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
6 |
af4f0d52f948
Add some tests for symlink tracking
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
7 for f in sys.argv[1:]: |
af4f0d52f948
Add some tests for symlink tracking
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
8 print f, '->', os.readlink(f) |
af4f0d52f948
Add some tests for symlink tracking
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
9 EOF |
af4f0d52f948
Add some tests for symlink tracking
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
10 |
af4f0d52f948
Add some tests for symlink tracking
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
11 hg init a |
af4f0d52f948
Add some tests for symlink tracking
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
12 cd a |
af4f0d52f948
Add some tests for symlink tracking
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
13 ln -s nothing dangling |
af4f0d52f948
Add some tests for symlink tracking
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
14 hg add dangling |
af4f0d52f948
Add some tests for symlink tracking
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
15 hg commit -m 'add symlink' -d '0 0' |
af4f0d52f948
Add some tests for symlink tracking
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
16 |
af4f0d52f948
Add some tests for symlink tracking
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
17 hg tip -v |
af4f0d52f948
Add some tests for symlink tracking
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
18 hg manifest --debug |
af4f0d52f948
Add some tests for symlink tracking
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
19 echo '% rev 0:' |
af4f0d52f948
Add some tests for symlink tracking
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
20 python ../readlink.py dangling |
af4f0d52f948
Add some tests for symlink tracking
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
21 |
af4f0d52f948
Add some tests for symlink tracking
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
22 rm dangling |
af4f0d52f948
Add some tests for symlink tracking
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
23 ln -s void dangling |
af4f0d52f948
Add some tests for symlink tracking
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
24 hg commit -m 'change symlink' |
af4f0d52f948
Add some tests for symlink tracking
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
25 echo '% rev 1:' |
af4f0d52f948
Add some tests for symlink tracking
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
26 python ../readlink.py dangling |
af4f0d52f948
Add some tests for symlink tracking
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
27 |
af4f0d52f948
Add some tests for symlink tracking
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
28 echo '% modifying link' |
af4f0d52f948
Add some tests for symlink tracking
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
29 rm dangling |
af4f0d52f948
Add some tests for symlink tracking
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
30 ln -s empty dangling |
af4f0d52f948
Add some tests for symlink tracking
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
31 python ../readlink.py dangling |
af4f0d52f948
Add some tests for symlink tracking
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
32 |
af4f0d52f948
Add some tests for symlink tracking
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
33 echo '% reverting to rev 0:' |
af4f0d52f948
Add some tests for symlink tracking
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
34 hg revert -r 0 -a |
af4f0d52f948
Add some tests for symlink tracking
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
35 python ../readlink.py dangling |
af4f0d52f948
Add some tests for symlink tracking
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
36 |
af4f0d52f948
Add some tests for symlink tracking
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
37 echo '% backups:' |
af4f0d52f948
Add some tests for symlink tracking
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
38 python ../readlink.py *.orig |
af4f0d52f948
Add some tests for symlink tracking
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
39 |
af4f0d52f948
Add some tests for symlink tracking
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
40 rm *.orig |
af4f0d52f948
Add some tests for symlink tracking
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
41 hg up -C |
af4f0d52f948
Add some tests for symlink tracking
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
42 echo '% copies' |
af4f0d52f948
Add some tests for symlink tracking
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
43 hg cp -v dangling dangling2 |
af4f0d52f948
Add some tests for symlink tracking
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
44 hg st -Cmard |
af4f0d52f948
Add some tests for symlink tracking
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff
changeset
|
45 python ../readlink.py dangling dangling2 |