author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
Wed, 02 Nov 2005 15:46:31 -0800 | |
changeset 1487 | 2bc6cd62a29c |
parent 1408 | 5010207c3527 |
child 1527 | c13fce7167c2 |
permissions | -rwxr-xr-x |
1408 | 1 |
#!/bin/sh |
2 |
#Test bug regarding symlinks that showed up in hg 0.7 |
|
3 |
#Author: Matthew Elder <sseses@gmail.com> |
|
4 |
||
5 |
#make and initialize repo |
|
6 |
hg init test; cd test; |
|
7 |
||
8 |
#make a file and a symlink |
|
9 |
touch foo; ln -s foo bar; |
|
10 |
||
11 |
#import with addremove -- symlink walking should _not_ screwup. |
|
12 |
hg addremove |
|
13 |
||
14 |
#commit -- the symlink should _not_ appear added to dir state |
|
15 |
hg commit -m 'initial' |
|
16 |
||
17 |
#add a new file so hg will let me commit again |
|
18 |
touch bomb |
|
19 |
||
20 |
#again, symlink should _not_ show up on dir state |
|
21 |
hg addremove |
|
22 |
||
23 |
#Assert screamed here before, should go by without consequence |
|
24 |
hg commit -m 'is there a bug?' |
|
1487
2bc6cd62a29c
fix handling of files of unsupported type in the walk code
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
1408
diff
changeset
|
25 |
|
2bc6cd62a29c
fix handling of files of unsupported type in the walk code
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
1408
diff
changeset
|
26 |
cd .. ; rm -rf test |
2bc6cd62a29c
fix handling of files of unsupported type in the walk code
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
1408
diff
changeset
|
27 |
hg init test; cd test; |
2bc6cd62a29c
fix handling of files of unsupported type in the walk code
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
1408
diff
changeset
|
28 |
|
2bc6cd62a29c
fix handling of files of unsupported type in the walk code
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
1408
diff
changeset
|
29 |
mkdir dir |
2bc6cd62a29c
fix handling of files of unsupported type in the walk code
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
1408
diff
changeset
|
30 |
touch a.c dir/a.o dir/b.o |
2bc6cd62a29c
fix handling of files of unsupported type in the walk code
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
1408
diff
changeset
|
31 |
# test what happens if we want to trick hg |
2bc6cd62a29c
fix handling of files of unsupported type in the walk code
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
1408
diff
changeset
|
32 |
hg commit -A -m 0 |
2bc6cd62a29c
fix handling of files of unsupported type in the walk code
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
1408
diff
changeset
|
33 |
echo "relglob:*.o" > .hgignore |
2bc6cd62a29c
fix handling of files of unsupported type in the walk code
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
1408
diff
changeset
|
34 |
rm a.c |
2bc6cd62a29c
fix handling of files of unsupported type in the walk code
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
1408
diff
changeset
|
35 |
rm dir/a.o |
2bc6cd62a29c
fix handling of files of unsupported type in the walk code
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
1408
diff
changeset
|
36 |
rm dir/b.o |
2bc6cd62a29c
fix handling of files of unsupported type in the walk code
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
1408
diff
changeset
|
37 |
mkdir dir/a.o |
2bc6cd62a29c
fix handling of files of unsupported type in the walk code
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
1408
diff
changeset
|
38 |
ln -sf nonexist dir/b.o |
2bc6cd62a29c
fix handling of files of unsupported type in the walk code
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
1408
diff
changeset
|
39 |
mkfifo a.c |
2bc6cd62a29c
fix handling of files of unsupported type in the walk code
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
1408
diff
changeset
|
40 |
# it should show a.c, dir/a.o and dir/b.o removed |
2bc6cd62a29c
fix handling of files of unsupported type in the walk code
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
1408
diff
changeset
|
41 |
hg status |