Show More
@@ -0,0 +1,163 b'' | |||||
|
1 | $ hg init | |||
|
2 | ||||
|
3 | Set up history and working copy | |||
|
4 | ||||
|
5 | $ python $TESTDIR/generate-working-copy-states.py state 2 1 | |||
|
6 | $ hg addremove -q --similarity 0 | |||
|
7 | $ hg commit -m first | |||
|
8 | ||||
|
9 | $ python $TESTDIR/generate-working-copy-states.py state 2 2 | |||
|
10 | $ hg addremove -q --similarity 0 | |||
|
11 | $ hg commit -m second | |||
|
12 | ||||
|
13 | $ python $TESTDIR/generate-working-copy-states.py state 2 wc | |||
|
14 | $ hg addremove -q --similarity 0 | |||
|
15 | $ hg forget *_*_*-untracked | |||
|
16 | $ rm *_*_missing-* | |||
|
17 | ||||
|
18 | Test status | |||
|
19 | ||||
|
20 | $ hg st -A 'set:modified()' | |||
|
21 | M content1_content1_content3-tracked | |||
|
22 | M content1_content2_content1-tracked | |||
|
23 | M content1_content2_content3-tracked | |||
|
24 | M missing_content2_content3-tracked | |||
|
25 | ||||
|
26 | $ hg st -A 'set:added()' | |||
|
27 | A content1_missing_content1-tracked | |||
|
28 | A content1_missing_content3-tracked | |||
|
29 | A missing_missing_content3-tracked | |||
|
30 | ||||
|
31 | $ hg st -A 'set:removed()' | |||
|
32 | R content1_content1_content1-untracked | |||
|
33 | R content1_content1_content3-untracked | |||
|
34 | R content1_content1_missing-untracked | |||
|
35 | R content1_content2_content1-untracked | |||
|
36 | R content1_content2_content2-untracked | |||
|
37 | R content1_content2_content3-untracked | |||
|
38 | R content1_content2_missing-untracked | |||
|
39 | R missing_content2_content2-untracked | |||
|
40 | R missing_content2_content3-untracked | |||
|
41 | R missing_content2_missing-untracked | |||
|
42 | ||||
|
43 | $ hg st -A 'set:deleted()' | |||
|
44 | ! content1_content1_missing-tracked | |||
|
45 | ! content1_content2_missing-tracked | |||
|
46 | ! content1_missing_missing-tracked | |||
|
47 | ! missing_content2_missing-tracked | |||
|
48 | ! missing_missing_missing-tracked | |||
|
49 | ||||
|
50 | $ hg st -A 'set:unknown()' | |||
|
51 | ? content1_missing_content1-untracked | |||
|
52 | ? content1_missing_content3-untracked | |||
|
53 | ? missing_missing_content3-untracked | |||
|
54 | ||||
|
55 | $ hg st -A 'set:clean()' | |||
|
56 | C content1_content1_content1-tracked | |||
|
57 | C content1_content2_content2-tracked | |||
|
58 | C missing_content2_content2-tracked | |||
|
59 | ||||
|
60 | Test log | |||
|
61 | ||||
|
62 | $ hg log -T '{rev}\n' --stat 'set:modified()' | |||
|
63 | 1 | |||
|
64 | content1_content2_content1-tracked | 2 +- | |||
|
65 | content1_content2_content3-tracked | 2 +- | |||
|
66 | missing_content2_content3-tracked | 1 + | |||
|
67 | 3 files changed, 3 insertions(+), 2 deletions(-) | |||
|
68 | ||||
|
69 | 0 | |||
|
70 | content1_content1_content3-tracked | 1 + | |||
|
71 | content1_content2_content1-tracked | 1 + | |||
|
72 | content1_content2_content3-tracked | 1 + | |||
|
73 | 3 files changed, 3 insertions(+), 0 deletions(-) | |||
|
74 | ||||
|
75 | BROKEN: rev 0 affects content1_missing_content*-tracked | |||
|
76 | ||||
|
77 | $ hg log -T '{rev}\n' --stat 'set:added()' | |||
|
78 | 1 | |||
|
79 | content1_missing_content1-tracked | 1 - | |||
|
80 | content1_missing_content3-tracked | 1 - | |||
|
81 | 2 files changed, 0 insertions(+), 2 deletions(-) | |||
|
82 | ||||
|
83 | $ hg log -T '{rev}\n' --stat 'set:removed()' | |||
|
84 | 1 | |||
|
85 | content1_content2_content1-untracked | 2 +- | |||
|
86 | content1_content2_content2-untracked | 2 +- | |||
|
87 | content1_content2_content3-untracked | 2 +- | |||
|
88 | content1_content2_missing-untracked | 2 +- | |||
|
89 | missing_content2_content2-untracked | 1 + | |||
|
90 | missing_content2_content3-untracked | 1 + | |||
|
91 | missing_content2_missing-untracked | 1 + | |||
|
92 | 7 files changed, 7 insertions(+), 4 deletions(-) | |||
|
93 | ||||
|
94 | 0 | |||
|
95 | content1_content1_content1-untracked | 1 + | |||
|
96 | content1_content1_content3-untracked | 1 + | |||
|
97 | content1_content1_missing-untracked | 1 + | |||
|
98 | content1_content2_content1-untracked | 1 + | |||
|
99 | content1_content2_content2-untracked | 1 + | |||
|
100 | content1_content2_content3-untracked | 1 + | |||
|
101 | content1_content2_missing-untracked | 1 + | |||
|
102 | 7 files changed, 7 insertions(+), 0 deletions(-) | |||
|
103 | ||||
|
104 | BROKEN: rev 0 affects content1_content1_missing-tracked, | |||
|
105 | content1_content2_missing-tracked and content1_missing_missing-tracked. | |||
|
106 | rev 1 affects content1_content2_missing-tracked, | |||
|
107 | content1_missing_missing-tracked and missing_content2_missing-tracked | |||
|
108 | ||||
|
109 | $ hg log -T '{rev}\n' --stat 'set:deleted()' | |||
|
110 | ||||
|
111 | BROKEN: rev 0 and 1 affect content1_missing_content*-untracked | |||
|
112 | ||||
|
113 | $ hg log -T '{rev}\n' --stat 'set:unknown()' | |||
|
114 | ||||
|
115 | BROKEN: rev 1 affects content1_content2_content2-tracked and | |||
|
116 | missing_content2_content2-tracked | |||
|
117 | ||||
|
118 | $ hg log -T '{rev}\n' --stat 'set:clean()' | |||
|
119 | 0 | |||
|
120 | content1_content1_content1-tracked | 1 + | |||
|
121 | content1_content2_content2-tracked | 1 + | |||
|
122 | 2 files changed, 2 insertions(+), 0 deletions(-) | |||
|
123 | ||||
|
124 | Test revert | |||
|
125 | ||||
|
126 | BROKEN: the files that get undeleted were not modified, they were removed, | |||
|
127 | and content1_content2_missing-tracked was also not modified, it was deleted | |||
|
128 | ||||
|
129 | $ hg revert 'set:modified()' | |||
|
130 | reverting content1_content1_content3-tracked | |||
|
131 | reverting content1_content2_content1-tracked | |||
|
132 | undeleting content1_content2_content1-untracked | |||
|
133 | undeleting content1_content2_content2-untracked | |||
|
134 | reverting content1_content2_content3-tracked | |||
|
135 | undeleting content1_content2_content3-untracked | |||
|
136 | reverting content1_content2_missing-tracked | |||
|
137 | undeleting content1_content2_missing-untracked | |||
|
138 | reverting missing_content2_content3-tracked | |||
|
139 | ||||
|
140 | BROKEN: only the files that get forgotten are correct | |||
|
141 | ||||
|
142 | $ hg revert 'set:added()' | |||
|
143 | forgetting content1_missing_content1-tracked | |||
|
144 | forgetting content1_missing_content3-tracked | |||
|
145 | undeleting missing_content2_content2-untracked | |||
|
146 | undeleting missing_content2_content3-untracked | |||
|
147 | reverting missing_content2_missing-tracked | |||
|
148 | undeleting missing_content2_missing-untracked | |||
|
149 | forgetting missing_missing_content3-tracked | |||
|
150 | ||||
|
151 | $ hg revert 'set:removed()' | |||
|
152 | undeleting content1_content1_content1-untracked | |||
|
153 | undeleting content1_content1_content3-untracked | |||
|
154 | undeleting content1_content1_missing-untracked | |||
|
155 | ||||
|
156 | $ hg revert 'set:deleted()' | |||
|
157 | reverting content1_content1_missing-tracked | |||
|
158 | forgetting content1_missing_missing-tracked | |||
|
159 | forgetting missing_missing_missing-tracked | |||
|
160 | ||||
|
161 | $ hg revert 'set:unknown()' | |||
|
162 | ||||
|
163 | $ hg revert 'set:clean()' |
General Comments 0
You need to be logged in to leave comments.
Login now