##// END OF EJS Templates
tests: handle differences between missing file error strings on Windows and Unix
Matt Harbison -
r23353:c2907334 default
parent child Browse files
Show More
@@ -1,161 +1,166 b''
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
3
4 $ hg init
4 $ hg init
5
5
6 First commit
6 First commit
7
7
8 $ python $TESTDIR/generate-working-copy-states.py base
8 $ python $TESTDIR/generate-working-copy-states.py base
9 $ hg addremove --similarity 0
9 $ hg addremove --similarity 0
10 adding content1_content1_content1-tracked
10 adding content1_content1_content1-tracked
11 adding content1_content1_content1-untracked
11 adding content1_content1_content1-untracked
12 adding content1_content1_content3-tracked
12 adding content1_content1_content3-tracked
13 adding content1_content1_content3-untracked
13 adding content1_content1_content3-untracked
14 adding content1_content1_missing-tracked
14 adding content1_content1_missing-tracked
15 adding content1_content1_missing-untracked
15 adding content1_content1_missing-untracked
16 adding content1_content2_content1-tracked
16 adding content1_content2_content1-tracked
17 adding content1_content2_content1-untracked
17 adding content1_content2_content1-untracked
18 adding content1_content2_content2-tracked
18 adding content1_content2_content2-tracked
19 adding content1_content2_content2-untracked
19 adding content1_content2_content2-untracked
20 adding content1_content2_content3-tracked
20 adding content1_content2_content3-tracked
21 adding content1_content2_content3-untracked
21 adding content1_content2_content3-untracked
22 adding content1_content2_missing-tracked
22 adding content1_content2_missing-tracked
23 adding content1_content2_missing-untracked
23 adding content1_content2_missing-untracked
24 adding content1_missing_content1-tracked
24 adding content1_missing_content1-tracked
25 adding content1_missing_content1-untracked
25 adding content1_missing_content1-untracked
26 adding content1_missing_content3-tracked
26 adding content1_missing_content3-tracked
27 adding content1_missing_content3-untracked
27 adding content1_missing_content3-untracked
28 adding content1_missing_missing-tracked
28 adding content1_missing_missing-tracked
29 adding content1_missing_missing-untracked
29 adding content1_missing_missing-untracked
30 $ hg commit -m first
30 $ hg commit -m first
31
31
32 Second commit
32 Second commit
33
33
34 $ python $TESTDIR/generate-working-copy-states.py parent
34 $ python $TESTDIR/generate-working-copy-states.py parent
35 $ hg addremove --similarity 0
35 $ hg addremove --similarity 0
36 removing content1_missing_content1-tracked
36 removing content1_missing_content1-tracked
37 removing content1_missing_content1-untracked
37 removing content1_missing_content1-untracked
38 removing content1_missing_content3-tracked
38 removing content1_missing_content3-tracked
39 removing content1_missing_content3-untracked
39 removing content1_missing_content3-untracked
40 removing content1_missing_missing-tracked
40 removing content1_missing_missing-tracked
41 removing content1_missing_missing-untracked
41 removing content1_missing_missing-untracked
42 adding missing_content2_content2-tracked
42 adding missing_content2_content2-tracked
43 adding missing_content2_content2-untracked
43 adding missing_content2_content2-untracked
44 adding missing_content2_content3-tracked
44 adding missing_content2_content3-tracked
45 adding missing_content2_content3-untracked
45 adding missing_content2_content3-untracked
46 adding missing_content2_missing-tracked
46 adding missing_content2_missing-tracked
47 adding missing_content2_missing-untracked
47 adding missing_content2_missing-untracked
48 $ hg commit -m second
48 $ hg commit -m second
49
49
50 Working copy
50 Working copy
51
51
52 $ python $TESTDIR/generate-working-copy-states.py wc
52 $ python $TESTDIR/generate-working-copy-states.py wc
53 $ hg addremove --similarity 0
53 $ hg addremove --similarity 0
54 adding content1_missing_content1-tracked
54 adding content1_missing_content1-tracked
55 adding content1_missing_content1-untracked
55 adding content1_missing_content1-untracked
56 adding content1_missing_content3-tracked
56 adding content1_missing_content3-tracked
57 adding content1_missing_content3-untracked
57 adding content1_missing_content3-untracked
58 adding content1_missing_missing-tracked
58 adding content1_missing_missing-tracked
59 adding content1_missing_missing-untracked
59 adding content1_missing_missing-untracked
60 adding missing_missing_content3-tracked
60 adding missing_missing_content3-tracked
61 adding missing_missing_content3-untracked
61 adding missing_missing_content3-untracked
62 adding missing_missing_missing-tracked
62 adding missing_missing_missing-tracked
63 adding missing_missing_missing-untracked
63 adding missing_missing_missing-untracked
64 $ hg forget *_*_*-untracked
64 $ hg forget *_*_*-untracked
65 $ rm *_*_missing-*
65 $ rm *_*_missing-*
66
66
67 Status compared to parent of the working copy, i.e. the dirstate status
67 Status compared to parent of the working copy, i.e. the dirstate status
68
68
69 $ hg status -A --rev 1 'glob:missing_content2_content3-tracked'
69 $ hg status -A --rev 1 'glob:missing_content2_content3-tracked'
70 M missing_content2_content3-tracked
70 M missing_content2_content3-tracked
71 $ hg status -A --rev 1 'glob:missing_content2_content2-tracked'
71 $ hg status -A --rev 1 'glob:missing_content2_content2-tracked'
72 C missing_content2_content2-tracked
72 C missing_content2_content2-tracked
73 $ hg status -A --rev 1 'glob:missing_missing_content3-tracked'
73 $ hg status -A --rev 1 'glob:missing_missing_content3-tracked'
74 A missing_missing_content3-tracked
74 A missing_missing_content3-tracked
75 $ hg status -A --rev 1 'glob:missing_missing_content3-untracked'
75 $ hg status -A --rev 1 'glob:missing_missing_content3-untracked'
76 ? missing_missing_content3-untracked
76 ? missing_missing_content3-untracked
77 $ hg status -A --rev 1 'glob:missing_content2_*-untracked'
77 $ hg status -A --rev 1 'glob:missing_content2_*-untracked'
78 R missing_content2_content2-untracked
78 R missing_content2_content2-untracked
79 R missing_content2_content3-untracked
79 R missing_content2_content3-untracked
80 R missing_content2_missing-untracked
80 R missing_content2_missing-untracked
81 $ hg status -A --rev 1 'glob:missing_*_missing-tracked'
81 $ hg status -A --rev 1 'glob:missing_*_missing-tracked'
82 ! missing_content2_missing-tracked
82 ! missing_content2_missing-tracked
83 ! missing_missing_missing-tracked
83 ! missing_missing_missing-tracked
84 #if windows
85 $ hg status -A --rev 1 'glob:missing_missing_missing-untracked'
86 missing_missing_missing-untracked: The system cannot find the file specified
87 #else
84 $ hg status -A --rev 1 'glob:missing_missing_missing-untracked'
88 $ hg status -A --rev 1 'glob:missing_missing_missing-untracked'
85 missing_missing_missing-untracked: No such file or directory
89 missing_missing_missing-untracked: No such file or directory
90 #endif
86
91
87 Status between first and second commit. Should ignore dirstate status.
92 Status between first and second commit. Should ignore dirstate status.
88
93
89 $ hg status -A --rev 0:1 'glob:content1_content2_*'
94 $ hg status -A --rev 0:1 'glob:content1_content2_*'
90 M content1_content2_content1-tracked
95 M content1_content2_content1-tracked
91 M content1_content2_content1-untracked
96 M content1_content2_content1-untracked
92 M content1_content2_content2-tracked
97 M content1_content2_content2-tracked
93 M content1_content2_content2-untracked
98 M content1_content2_content2-untracked
94 M content1_content2_content3-tracked
99 M content1_content2_content3-tracked
95 M content1_content2_content3-untracked
100 M content1_content2_content3-untracked
96 M content1_content2_missing-tracked
101 M content1_content2_missing-tracked
97 M content1_content2_missing-untracked
102 M content1_content2_missing-untracked
98 $ hg status -A --rev 0:1 'glob:content1_content1_*'
103 $ hg status -A --rev 0:1 'glob:content1_content1_*'
99 C content1_content1_content1-tracked
104 C content1_content1_content1-tracked
100 C content1_content1_content1-untracked
105 C content1_content1_content1-untracked
101 C content1_content1_content3-tracked
106 C content1_content1_content3-tracked
102 C content1_content1_content3-untracked
107 C content1_content1_content3-untracked
103 C content1_content1_missing-tracked
108 C content1_content1_missing-tracked
104 C content1_content1_missing-untracked
109 C content1_content1_missing-untracked
105 $ hg status -A --rev 0:1 'glob:missing_content2_*'
110 $ hg status -A --rev 0:1 'glob:missing_content2_*'
106 A missing_content2_content2-tracked
111 A missing_content2_content2-tracked
107 A missing_content2_content2-untracked
112 A missing_content2_content2-untracked
108 A missing_content2_content3-tracked
113 A missing_content2_content3-tracked
109 A missing_content2_content3-untracked
114 A missing_content2_content3-untracked
110 A missing_content2_missing-tracked
115 A missing_content2_missing-tracked
111 A missing_content2_missing-untracked
116 A missing_content2_missing-untracked
112 $ hg status -A --rev 0:1 'glob:content1_missing_*'
117 $ hg status -A --rev 0:1 'glob:content1_missing_*'
113 R content1_missing_content1-tracked
118 R content1_missing_content1-tracked
114 R content1_missing_content1-untracked
119 R content1_missing_content1-untracked
115 R content1_missing_content3-tracked
120 R content1_missing_content3-tracked
116 R content1_missing_content3-untracked
121 R content1_missing_content3-untracked
117 R content1_missing_missing-tracked
122 R content1_missing_missing-tracked
118 R content1_missing_missing-untracked
123 R content1_missing_missing-untracked
119 $ hg status -A --rev 0:1 'glob:missing_missing_*'
124 $ hg status -A --rev 0:1 'glob:missing_missing_*'
120
125
121 Status compared to one revision back, checking that the dirstate status
126 Status compared to one revision back, checking that the dirstate status
122 is correctly combined with the inter-revision status
127 is correctly combined with the inter-revision status
123
128
124 $ hg status -A --rev 0 'glob:content1_*_content[23]-tracked'
129 $ hg status -A --rev 0 'glob:content1_*_content[23]-tracked'
125 M content1_content1_content3-tracked
130 M content1_content1_content3-tracked
126 M content1_content2_content2-tracked
131 M content1_content2_content2-tracked
127 M content1_content2_content3-tracked
132 M content1_content2_content3-tracked
128 M content1_missing_content3-tracked
133 M content1_missing_content3-tracked
129 $ hg status -A --rev 0 'glob:content1_*_content1-tracked'
134 $ hg status -A --rev 0 'glob:content1_*_content1-tracked'
130 C content1_content1_content1-tracked
135 C content1_content1_content1-tracked
131 C content1_content2_content1-tracked
136 C content1_content2_content1-tracked
132 C content1_missing_content1-tracked
137 C content1_missing_content1-tracked
133 $ hg status -A --rev 0 'glob:missing_*_content?-tracked'
138 $ hg status -A --rev 0 'glob:missing_*_content?-tracked'
134 A missing_content2_content2-tracked
139 A missing_content2_content2-tracked
135 A missing_content2_content3-tracked
140 A missing_content2_content3-tracked
136 A missing_missing_content3-tracked
141 A missing_missing_content3-tracked
137 BROKEN: missing_content2_content[23]-untracked exist, so should be listed
142 BROKEN: missing_content2_content[23]-untracked exist, so should be listed
138 $ hg status -A --rev 0 'glob:missing_*_content?-untracked'
143 $ hg status -A --rev 0 'glob:missing_*_content?-untracked'
139 ? missing_missing_content3-untracked
144 ? missing_missing_content3-untracked
140 $ hg status -A --rev 0 'glob:content1_*_*-untracked'
145 $ hg status -A --rev 0 'glob:content1_*_*-untracked'
141 R content1_content1_content1-untracked
146 R content1_content1_content1-untracked
142 R content1_content1_content3-untracked
147 R content1_content1_content3-untracked
143 R content1_content1_missing-untracked
148 R content1_content1_missing-untracked
144 R content1_content2_content1-untracked
149 R content1_content2_content1-untracked
145 R content1_content2_content2-untracked
150 R content1_content2_content2-untracked
146 R content1_content2_content3-untracked
151 R content1_content2_content3-untracked
147 R content1_content2_missing-untracked
152 R content1_content2_missing-untracked
148 R content1_missing_content1-untracked
153 R content1_missing_content1-untracked
149 R content1_missing_content3-untracked
154 R content1_missing_content3-untracked
150 R content1_missing_missing-untracked
155 R content1_missing_missing-untracked
151 BROKEN: content1_*_missing-tracked appear twice; should just be '!'
156 BROKEN: content1_*_missing-tracked appear twice; should just be '!'
152 $ hg status -A --rev 0 'glob:*_*_missing-tracked'
157 $ hg status -A --rev 0 'glob:*_*_missing-tracked'
153 R content1_missing_missing-tracked
158 R content1_missing_missing-tracked
154 ! content1_content1_missing-tracked
159 ! content1_content1_missing-tracked
155 ! content1_content2_missing-tracked
160 ! content1_content2_missing-tracked
156 ! content1_missing_missing-tracked
161 ! content1_missing_missing-tracked
157 ! missing_content2_missing-tracked
162 ! missing_content2_missing-tracked
158 ! missing_missing_missing-tracked
163 ! missing_missing_missing-tracked
159 C content1_content1_missing-tracked
164 C content1_content1_missing-tracked
160 C content1_content2_missing-tracked
165 C content1_content2_missing-tracked
161 $ hg status -A --rev 0 'glob:missing_*_missing-untracked'
166 $ hg status -A --rev 0 'glob:missing_*_missing-untracked'
General Comments 0
You need to be logged in to leave comments. Login now