Show More
@@ -0,0 +1,156 b'' | |||
|
1 | Tests of 'hg status --rev <rev>' to make sure status between <rev> and '.' get | |
|
2 | combined correctly with the dirstate status. | |
|
3 | ||
|
4 | Sets up a history for a number of files where the filename describes the file's | |
|
5 | history. The first two letters of the filename describe the first two commits; | |
|
6 | the third letter describes the dirstate for the file. For example, a file called | |
|
7 | 'amr' was added in the first commit, modified in the second and then removed in | |
|
8 | the dirstate. | |
|
9 | ||
|
10 | These codes are used for commits: | |
|
11 | x: does not exist | |
|
12 | a: added | |
|
13 | c: clean | |
|
14 | m: modified | |
|
15 | r: removed | |
|
16 | ||
|
17 | These codes are used for dirstate: | |
|
18 | d: in dirstate, but deleted from disk | |
|
19 | f: removed from dirstate, but file exists (forgotten) | |
|
20 | r: removed from dirstate and disk | |
|
21 | q: added, but deleted from disk (q for q-rious?) | |
|
22 | u: not in dirstate, but file exists (unknown) | |
|
23 | ||
|
24 | $ hg init | |
|
25 | $ touch .hgignore | |
|
26 | $ hg add .hgignore | |
|
27 | $ hg commit -m initial | |
|
28 | ||
|
29 | First letter: first commit | |
|
30 | ||
|
31 | $ echo a >acc | |
|
32 | $ echo a >acd | |
|
33 | $ echo a >acf | |
|
34 | $ echo a >acm | |
|
35 | $ echo a >acr | |
|
36 | $ echo a >amc | |
|
37 | $ echo a >amd | |
|
38 | $ echo a >amf | |
|
39 | $ echo a >amm | |
|
40 | $ echo a >amr | |
|
41 | $ echo a >ara | |
|
42 | $ echo a >arq | |
|
43 | $ echo a >aru | |
|
44 | $ hg commit -Aqm first | |
|
45 | ||
|
46 | Second letter: second commit | |
|
47 | ||
|
48 | $ echo b >xad | |
|
49 | $ echo b >xaf | |
|
50 | $ echo b >xam | |
|
51 | $ echo b >xar | |
|
52 | $ echo b >amc | |
|
53 | $ echo b >amd | |
|
54 | $ echo b >amf | |
|
55 | $ echo b >amm | |
|
56 | $ echo b >amr | |
|
57 | $ hg rm ara | |
|
58 | $ hg rm arq | |
|
59 | $ hg rm aru | |
|
60 | $ hg commit -Aqm second | |
|
61 | ||
|
62 | Third letter: dirstate | |
|
63 | ||
|
64 | $ echo c >acm | |
|
65 | $ echo c >amm | |
|
66 | $ echo c >xam | |
|
67 | $ echo c >ara && hg add ara | |
|
68 | $ echo c >arq && hg add arq && rm arq | |
|
69 | $ echo c >aru | |
|
70 | $ hg rm amr | |
|
71 | $ hg rm acr | |
|
72 | $ hg rm xar | |
|
73 | $ rm acd | |
|
74 | $ rm amd | |
|
75 | $ rm xad | |
|
76 | $ hg forget acf | |
|
77 | $ hg forget amf | |
|
78 | $ hg forget xaf | |
|
79 | $ touch xxu | |
|
80 | ||
|
81 | Status compared to one revision back | |
|
82 | ||
|
83 | $ hg status -A --rev 1 acc | |
|
84 | C acc | |
|
85 | BROKEN: file appears twice; should be '!' | |
|
86 | $ hg status -A --rev 1 acd | |
|
87 | ! acd | |
|
88 | C acd | |
|
89 | $ hg status -A --rev 1 acf | |
|
90 | R acf | |
|
91 | $ hg status -A --rev 1 acm | |
|
92 | M acm | |
|
93 | $ hg status -A --rev 1 acr | |
|
94 | R acr | |
|
95 | $ hg status -A --rev 1 amc | |
|
96 | M amc | |
|
97 | BROKEN: file appears twice; should be '!' | |
|
98 | $ hg status -A --rev 1 amd | |
|
99 | ! amd | |
|
100 | C amd | |
|
101 | $ hg status -A --rev 1 amf | |
|
102 | R amf | |
|
103 | $ hg status -A --rev 1 amm | |
|
104 | M amm | |
|
105 | $ hg status -A --rev 1 amr | |
|
106 | R amr | |
|
107 | $ hg status -A --rev 1 ara | |
|
108 | M ara | |
|
109 | BROKEN: file appears twice; should be '!' | |
|
110 | $ hg status -A --rev 1 arq | |
|
111 | R arq | |
|
112 | ! arq | |
|
113 | $ hg status -A --rev 1 aru | |
|
114 | R aru | |
|
115 | $ hg status -A --rev 1 xad | |
|
116 | ! xad | |
|
117 | $ hg status -A --rev 1 xaf | |
|
118 | $ hg status -A --rev 1 xam | |
|
119 | A xam | |
|
120 | $ hg status -A --rev 1 xar | |
|
121 | $ hg status -A --rev 1 xxu | |
|
122 | ? xxu | |
|
123 | ||
|
124 | Status compared to two revisions back | |
|
125 | ||
|
126 | $ hg status -A --rev 0 acc | |
|
127 | A acc | |
|
128 | $ hg status -A --rev 0 acd | |
|
129 | ! acd | |
|
130 | BROKEN: file exists, so should be listed (as '?') | |
|
131 | $ hg status -A --rev 0 acf | |
|
132 | $ hg status -A --rev 0 acm | |
|
133 | A acm | |
|
134 | $ hg status -A --rev 0 acr | |
|
135 | $ hg status -A --rev 0 amc | |
|
136 | A amc | |
|
137 | $ hg status -A --rev 0 amd | |
|
138 | ! amd | |
|
139 | BROKEN: file exists, so should be listed (as '?') | |
|
140 | $ hg status -A --rev 0 amf | |
|
141 | $ hg status -A --rev 0 amm | |
|
142 | A amm | |
|
143 | $ hg status -A --rev 0 amr | |
|
144 | $ hg status -A --rev 0 ara | |
|
145 | A ara | |
|
146 | $ hg status -A --rev 0 arq | |
|
147 | ! arq | |
|
148 | $ hg status -A --rev 0 aru | |
|
149 | ? aru | |
|
150 | $ hg status -A --rev 0 xad | |
|
151 | ! xad | |
|
152 | BROKEN: file exists, so should be listed (as '?') | |
|
153 | $ hg status -A --rev 0 xaf | |
|
154 | $ hg status -A --rev 0 xam | |
|
155 | A xam | |
|
156 | $ hg status -A --rev 0 xar |
@@ -322,19 +322,6 b' hg status -A --change 1 and revset:' | |||
|
322 | 322 | R removed |
|
323 | 323 | C deleted |
|
324 | 324 | |
|
325 | status against non-parent with unknown file (issue4321) | |
|
326 | ||
|
327 | $ touch unknown | |
|
328 | $ hg status --rev 0 unknown | |
|
329 | ? unknown | |
|
330 | ||
|
331 | status of removed but existing in working directory. "? removed" should | |
|
332 | not be included: | |
|
333 | ||
|
334 | $ touch removed | |
|
335 | $ hg status --rev 0 removed | |
|
336 | R removed | |
|
337 | ||
|
338 | 325 | $ cd .. |
|
339 | 326 | |
|
340 | 327 | hg status of binary file starting with '\1\n', a separator for metadata: |
General Comments 0
You need to be logged in to leave comments.
Login now