equal
deleted
inserted
replaced
|
1 #!/bin/sh |
|
2 |
|
3 cat <<EOF >> $HGRCPATH |
|
4 [extensions] |
|
5 purge=${TESTDIR}/../contrib/purge/purge.py |
|
6 EOF |
|
7 |
|
8 echo % init |
|
9 hg init t |
|
10 cd t |
|
11 |
|
12 echo % setup |
|
13 echo r1 > r1 |
|
14 hg ci -qAmr1 -d'0 0' |
|
15 mkdir directory |
|
16 echo r2 > directory/r2 |
|
17 hg ci -qAmr2 -d'1 0' |
|
18 echo 'ignored' > .hgignore |
|
19 hg ci -qAmr3 -d'2 0' |
|
20 |
|
21 echo % delete an empty directory |
|
22 mkdir empty_dir |
|
23 hg purge -p |
|
24 hg purge -v |
|
25 ls |
|
26 |
|
27 echo % delete an untracked directory |
|
28 mkdir untracked_dir |
|
29 touch untracked_dir/untracked_file1 |
|
30 touch untracked_dir/untracked_file2 |
|
31 hg purge -p |
|
32 hg purge -v |
|
33 ls |
|
34 |
|
35 echo % delete an untracked file |
|
36 touch untracked_file |
|
37 hg purge -p |
|
38 hg purge -v |
|
39 ls |
|
40 |
|
41 echo % delete an untracked file in a tracked directory |
|
42 touch directory/untracked_file |
|
43 hg purge -p |
|
44 hg purge -v |
|
45 ls |
|
46 |
|
47 echo % delete nested directories |
|
48 mkdir -p untracked_directory/nested_directory |
|
49 hg purge -p |
|
50 hg purge -v |
|
51 ls |
|
52 |
|
53 echo % delete ignored files |
|
54 touch ignored |
|
55 hg purge -p |
|
56 hg purge -v |
|
57 ls |