comparison tests/test-status-rev.t @ 23196:daa73289dd2a

test-status-rev: use same names as from generate-working-copy-states To prepare for using generate-working-copy-states.py for generating the files and their content, let's start by renaming the files according to the naming scheme used by that script.
author Martin von Zweigbergk <martinvonz@google.com>
date Mon, 20 Oct 2014 23:56:55 -0700
parents eeaed3d2b004
children 636158ff7329
comparison
equal deleted inserted replaced
23195:29977b315be1 23196:daa73289dd2a
1 Tests of 'hg status --rev <rev>' to make sure status between <rev> and '.' get 1 Tests of 'hg status --rev <rev>' to make sure status between <rev> and '.' get
2 combined correctly with the dirstate status. 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 3
24 $ hg init 4 $ hg init
25 $ touch .hgignore 5 $ touch .hgignore
26 $ hg add .hgignore 6 $ hg add .hgignore
27 $ hg commit -m initial 7 $ hg commit -m initial
28 8
29 First letter: first commit 9 First commit
30 10
31 $ echo a >acc 11 $ echo a >content1_content1_content1-tracked
32 $ echo a >acd 12 $ echo a >content1_content1_missing-tracked
33 $ echo a >acf 13 $ echo a >content1_content1_content1-untracked
34 $ echo a >acm 14 $ echo a >content1_content1_content3-tracked
35 $ echo a >acr 15 $ echo a >content1_content1_missing-untracked
36 $ echo a >amc 16 $ echo a >content1_content2_content2-tracked
37 $ echo a >amd 17 $ echo a >content1_content2_missing-tracked
38 $ echo a >amf 18 $ echo a >content1_content2_content2-untracked
39 $ echo a >amm 19 $ echo a >content1_content2_content3-tracked
40 $ echo a >amr 20 $ echo a >content1_content2_missing-untracked
41 $ echo a >ara 21 $ echo a >content1_missing_content3-tracked
42 $ echo a >arq 22 $ echo a >content1_missing_missing-tracked
43 $ echo a >aru 23 $ echo a >content1_missing_content3-untracked
44 $ hg commit -Aqm first 24 $ hg commit -Aqm first
45 25
46 Second letter: second commit 26 Second commit
47 27
48 $ echo b >xad 28 $ echo b >missing_content2_missing-tracked
49 $ echo b >xaf 29 $ echo b >missing_content2_content2-untracked
50 $ echo b >xam 30 $ echo b >missing_content2_content3-tracked
51 $ echo b >xar 31 $ echo b >missing_content2_missing-untracked
52 $ echo b >amc 32 $ echo b >content1_content2_content2-tracked
53 $ echo b >amd 33 $ echo b >content1_content2_content3-tracked
54 $ echo b >amf 34 $ echo b >content1_content2_content2-untracked
55 $ echo b >amm 35 $ echo b >content1_content2_content3-tracked
56 $ echo b >amr 36 $ echo b >content1_content2_missing-untracked
57 $ hg rm ara 37 $ hg rm content1_missing_content3-tracked
58 $ hg rm arq 38 $ hg rm content1_missing_missing-tracked
59 $ hg rm aru 39 $ hg rm content1_missing_content3-untracked
60 $ hg commit -Aqm second 40 $ hg commit -Aqm second
61 41
62 Third letter: dirstate 42 Working copy
63 43
64 $ echo c >acm 44 $ echo c >content1_content1_content3-tracked
65 $ echo c >amm 45 $ echo c >content1_content2_content3-tracked
66 $ echo c >xam 46 $ echo c >missing_content2_content3-tracked
67 $ echo c >ara && hg add ara 47 $ echo c >content1_missing_content3-tracked && hg add content1_missing_content3-tracked
68 $ echo c >arq && hg add arq && rm arq 48 $ echo c >content1_missing_missing-tracked && hg add content1_missing_missing-tracked && rm content1_missing_missing-tracked
69 $ echo c >aru 49 $ echo c >content1_missing_content3-untracked
70 $ hg rm amr 50 $ hg rm content1_content2_missing-untracked
71 $ hg rm acr 51 $ hg rm content1_content1_missing-untracked
72 $ hg rm xar 52 $ hg rm missing_content2_missing-untracked
73 $ rm acd 53 $ rm content1_content1_missing-tracked
74 $ rm amd 54 $ rm content1_content2_missing-tracked
75 $ rm xad 55 $ rm missing_content2_missing-tracked
76 $ hg forget acf 56 $ hg forget content1_content1_content1-untracked
77 $ hg forget amf 57 $ hg forget content1_content2_content2-untracked
78 $ hg forget xaf 58 $ hg forget missing_content2_content2-untracked
79 $ touch xxu 59 $ touch missing_missing_content3-untracked
80 60
81 Status compared to one revision back 61 Status compared to one revision back
82 62
83 $ hg status -A --rev 1 acc 63 $ hg status -A --rev 1 content1_content1_content1-tracked
84 C acc 64 C content1_content1_content1-tracked
85 BROKEN: file appears twice; should be '!' 65 BROKEN: file appears twice; should be '!'
86 $ hg status -A --rev 1 acd 66 $ hg status -A --rev 1 content1_content1_missing-tracked
87 ! acd 67 ! content1_content1_missing-tracked
88 C acd 68 C content1_content1_missing-tracked
89 $ hg status -A --rev 1 acf 69 $ hg status -A --rev 1 content1_content1_content1-untracked
90 R acf 70 R content1_content1_content1-untracked
91 $ hg status -A --rev 1 acm 71 $ hg status -A --rev 1 content1_content1_content3-tracked
92 M acm 72 M content1_content1_content3-tracked
93 $ hg status -A --rev 1 acr 73 $ hg status -A --rev 1 content1_content1_missing-untracked
94 R acr 74 R content1_content1_missing-untracked
95 $ hg status -A --rev 1 amc 75 $ hg status -A --rev 1 content1_content2_content2-tracked
96 M amc 76 M content1_content2_content2-tracked
97 BROKEN: file appears twice; should be '!' 77 BROKEN: file appears twice; should be '!'
98 $ hg status -A --rev 1 amd 78 $ hg status -A --rev 1 content1_content2_missing-tracked
99 ! amd 79 ! content1_content2_missing-tracked
100 C amd 80 C content1_content2_missing-tracked
101 $ hg status -A --rev 1 amf 81 $ hg status -A --rev 1 content1_content2_content2-untracked
102 R amf 82 R content1_content2_content2-untracked
103 $ hg status -A --rev 1 amm 83 $ hg status -A --rev 1 content1_content2_content3-tracked
104 M amm 84 M content1_content2_content3-tracked
105 $ hg status -A --rev 1 amr 85 $ hg status -A --rev 1 content1_content2_missing-untracked
106 R amr 86 R content1_content2_missing-untracked
107 $ hg status -A --rev 1 ara 87 $ hg status -A --rev 1 content1_missing_content3-tracked
108 M ara 88 M content1_missing_content3-tracked
109 BROKEN: file appears twice; should be '!' 89 BROKEN: file appears twice; should be '!'
110 $ hg status -A --rev 1 arq 90 $ hg status -A --rev 1 content1_missing_missing-tracked
111 R arq 91 R content1_missing_missing-tracked
112 ! arq 92 ! content1_missing_missing-tracked
113 $ hg status -A --rev 1 aru 93 $ hg status -A --rev 1 content1_missing_content3-untracked
114 R aru 94 R content1_missing_content3-untracked
115 $ hg status -A --rev 1 xad 95 $ hg status -A --rev 1 missing_content2_missing-tracked
116 ! xad 96 ! missing_content2_missing-tracked
117 $ hg status -A --rev 1 xaf 97 $ hg status -A --rev 1 missing_content2_content2-untracked
118 $ hg status -A --rev 1 xam 98 $ hg status -A --rev 1 missing_content2_content3-tracked
119 A xam 99 A missing_content2_content3-tracked
120 $ hg status -A --rev 1 xar 100 $ hg status -A --rev 1 missing_content2_missing-untracked
121 $ hg status -A --rev 1 xxu 101 $ hg status -A --rev 1 missing_missing_content3-untracked
122 ? xxu 102 ? missing_missing_content3-untracked
123 103
124 Status compared to two revisions back 104 Status compared to two revisions back
125 105
126 $ hg status -A --rev 0 acc 106 $ hg status -A --rev 0 content1_content1_content1-tracked
127 A acc 107 A content1_content1_content1-tracked
128 $ hg status -A --rev 0 acd 108 $ hg status -A --rev 0 content1_content1_missing-tracked
129 ! acd 109 ! content1_content1_missing-tracked
130 BROKEN: file exists, so should be listed (as '?') 110 BROKEN: file exists, so should be listed (as '?')
131 $ hg status -A --rev 0 acf 111 $ hg status -A --rev 0 content1_content1_content1-untracked
132 $ hg status -A --rev 0 acm 112 $ hg status -A --rev 0 content1_content1_content3-tracked
133 A acm 113 A content1_content1_content3-tracked
134 $ hg status -A --rev 0 acr 114 $ hg status -A --rev 0 content1_content1_missing-untracked
135 $ hg status -A --rev 0 amc 115 $ hg status -A --rev 0 content1_content2_content2-tracked
136 A amc 116 A content1_content2_content2-tracked
137 $ hg status -A --rev 0 amd 117 $ hg status -A --rev 0 content1_content2_missing-tracked
138 ! amd 118 ! content1_content2_missing-tracked
139 BROKEN: file exists, so should be listed (as '?') 119 BROKEN: file exists, so should be listed (as '?')
140 $ hg status -A --rev 0 amf 120 $ hg status -A --rev 0 content1_content2_content2-untracked
141 $ hg status -A --rev 0 amm 121 $ hg status -A --rev 0 content1_content2_content3-tracked
142 A amm 122 A content1_content2_content3-tracked
143 $ hg status -A --rev 0 amr 123 $ hg status -A --rev 0 content1_content2_missing-untracked
144 $ hg status -A --rev 0 ara 124 $ hg status -A --rev 0 content1_missing_content3-tracked
145 A ara 125 A content1_missing_content3-tracked
146 $ hg status -A --rev 0 arq 126 $ hg status -A --rev 0 content1_missing_missing-tracked
147 ! arq 127 ! content1_missing_missing-tracked
148 $ hg status -A --rev 0 aru 128 $ hg status -A --rev 0 content1_missing_content3-untracked
149 ? aru 129 ? content1_missing_content3-untracked
150 $ hg status -A --rev 0 xad 130 $ hg status -A --rev 0 missing_content2_missing-tracked
151 ! xad 131 ! missing_content2_missing-tracked
152 BROKEN: file exists, so should be listed (as '?') 132 BROKEN: file exists, so should be listed (as '?')
153 $ hg status -A --rev 0 xaf 133 $ hg status -A --rev 0 missing_content2_content2-untracked
154 $ hg status -A --rev 0 xam 134 $ hg status -A --rev 0 missing_content2_content3-tracked
155 A xam 135 A missing_content2_content3-tracked
156 $ hg status -A --rev 0 xar 136 $ hg status -A --rev 0 missing_content2_missing-untracked