Mercurial > hg > mercurial-crew-with-dirclash
annotate tests/test-symlink-basic @ 4555:1843d31bfdbf
localrepo: don't search from path
All current callers already pass in the repo root.
This normalizes things a bit. Now all repo types take a direct path to
repo root and only the command line interface (or the dispatcher)
searches from the current directory.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 11 Jun 2007 21:09:24 -0500 |
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 |