annotate tests/test-symlink-basic @ 5844:07d8eb78dd68

Add util.splitpath() and use it instead of using os.sep directly. This change is intended to allow hooking splitpath() by win32mbcs extension for MBCS support.
author Shun-ichi GOTO <shunichi.goto@gmail.com>
date Wed, 09 Jan 2008 21:30:36 +0900
parents 396c7010b0cd
children 5ffa962783c4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4274
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
4882
25d753efd48e test-symlink-basic: require symlinks availability
Patrick Mezard <pmezard@gmail.com>
parents: 4572
diff changeset
3 "$TESTDIR/hghave" symlink || exit 80
25d753efd48e test-symlink-basic: require symlinks availability
Patrick Mezard <pmezard@gmail.com>
parents: 4572
diff changeset
4
4572
6a8e1dd18ba2 commands.commit: symlinks are supported
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4274
diff changeset
5 cleanpath()
6a8e1dd18ba2 commands.commit: symlinks are supported
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4274
diff changeset
6 {
6a8e1dd18ba2 commands.commit: symlinks are supported
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4274
diff changeset
7 sed -e "s:/.*\(/test-symlink-basic/.*\):...\1:"
6a8e1dd18ba2 commands.commit: symlinks are supported
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4274
diff changeset
8 }
6a8e1dd18ba2 commands.commit: symlinks are supported
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4274
diff changeset
9
4274
af4f0d52f948 Add some tests for symlink tracking
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
10 hg init a
af4f0d52f948 Add some tests for symlink tracking
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
11 cd a
af4f0d52f948 Add some tests for symlink tracking
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
12 ln -s nothing dangling
4572
6a8e1dd18ba2 commands.commit: symlinks are supported
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4274
diff changeset
13 hg commit -m 'commit symlink without adding' -d '0 0' dangling 2>&1 | cleanpath
4274
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:'
5683
396c7010b0cd Use common readlink.py instead of own implementations per test script.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4882
diff changeset
20 $TESTDIR/readlink.py dangling
4274
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:'
5683
396c7010b0cd Use common readlink.py instead of own implementations per test script.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4882
diff changeset
26 $TESTDIR/readlink.py dangling
4274
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
5683
396c7010b0cd Use common readlink.py instead of own implementations per test script.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4882
diff changeset
31 $TESTDIR/readlink.py dangling
4274
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
5683
396c7010b0cd Use common readlink.py instead of own implementations per test script.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4882
diff changeset
35 $TESTDIR/readlink.py dangling
4274
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:'
5683
396c7010b0cd Use common readlink.py instead of own implementations per test script.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4882
diff changeset
38 $TESTDIR/readlink.py *.orig
4274
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
5683
396c7010b0cd Use common readlink.py instead of own implementations per test script.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 4882
diff changeset
45 $TESTDIR/readlink.py dangling dangling2