author | Emanuele Aina <faina.mail@tiscali.it> |
Tue, 06 Mar 2007 17:45:38 -0300 | |
changeset 4145 | 2ebdd33fe456 |
child 4155 | 4c714ed245d6 |
permissions | -rwxr-xr-x |
4145
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
1 |
#!/bin/sh |
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
2 |
|
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
3 |
cat <<EOF >> $HGRCPATH |
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
4 |
[extensions] |
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
5 |
purge=${TESTDIR}/../contrib/purge/purge.py |
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
6 |
EOF |
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
7 |
|
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
8 |
echo % init |
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
9 |
hg init t |
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
10 |
cd t |
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
11 |
|
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
12 |
echo % setup |
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
13 |
echo r1 > r1 |
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
14 |
hg ci -qAmr1 -d'0 0' |
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
15 |
mkdir directory |
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
16 |
echo r2 > directory/r2 |
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
17 |
hg ci -qAmr2 -d'1 0' |
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
18 |
echo 'ignored' > .hgignore |
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
19 |
hg ci -qAmr3 -d'2 0' |
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
20 |
|
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
21 |
echo % delete an empty directory |
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
22 |
mkdir empty_dir |
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
23 |
hg purge -p |
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
24 |
hg purge -v |
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
25 |
ls |
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
26 |
|
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
27 |
echo % delete an untracked directory |
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
28 |
mkdir untracked_dir |
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
29 |
touch untracked_dir/untracked_file1 |
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
30 |
touch untracked_dir/untracked_file2 |
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
31 |
hg purge -p |
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
32 |
hg purge -v |
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
33 |
ls |
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
34 |
|
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
35 |
echo % delete an untracked file |
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
36 |
touch untracked_file |
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
37 |
hg purge -p |
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
38 |
hg purge -v |
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
39 |
ls |
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
40 |
|
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
41 |
echo % delete an untracked file in a tracked directory |
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
42 |
touch directory/untracked_file |
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
43 |
hg purge -p |
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
44 |
hg purge -v |
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
45 |
ls |
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
46 |
|
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
47 |
echo % delete nested directories |
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
48 |
mkdir -p untracked_directory/nested_directory |
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
49 |
hg purge -p |
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
50 |
hg purge -v |
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
51 |
ls |
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
52 |
|
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
53 |
echo % delete ignored files |
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
54 |
touch ignored |
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
55 |
hg purge -p |
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
56 |
hg purge -v |
2ebdd33fe456
Add a test for the purge extension
Emanuele Aina <faina.mail@tiscali.it>
parents:
diff
changeset
|
57 |
ls |