equal
deleted
inserted
replaced
186 |
186 |
187 final cleanup |
187 final cleanup |
188 |
188 |
189 $ rm $TESTTMP/status-race-lock $TESTTMP/status-race-lock.waiting |
189 $ rm $TESTTMP/status-race-lock $TESTTMP/status-race-lock.waiting |
190 $ cd .. |
190 $ cd .. |
|
191 |
|
192 Actual Testing |
|
193 ============== |
|
194 |
|
195 Race with a `hg add` |
|
196 ------------------- |
|
197 |
|
198 $ cp -a reference-repo race-with-add |
|
199 $ cd race-with-add |
|
200 |
|
201 spin a `hg status` with some caches to update |
|
202 |
|
203 $ touch -t 200001020001 f |
|
204 $ hg st >$TESTTMP/status-race-lock.out 2>$TESTTMP/status-race-lock.log \ |
|
205 > --config rhg.on-unsupported=abort \ |
|
206 > --config devel.sync.status.pre-dirstate-write-file=$TESTTMP/status-race-lock \ |
|
207 > & |
|
208 $ $RUNTESTDIR/testlib/wait-on-file 5 $TESTTMP/status-race-lock.waiting |
|
209 |
|
210 Add a file |
|
211 |
|
212 $ hg add dir/n |
|
213 $ touch $TESTTMP/status-race-lock |
|
214 $ wait |
|
215 |
|
216 The file should in a "added" state |
|
217 |
|
218 $ hg status |
|
219 A dir/n (no-rhg !) |
|
220 A dir/n (missing-correct-output rhg !) |
|
221 A dir/o |
|
222 R dir/nested/m |
|
223 ? dir/n (known-bad-output rhg !) |
|
224 ? p |
|
225 ? q |
|
226 |
|
227 The status process should return a consistent result and not crash. |
|
228 |
|
229 $ cat $TESTTMP/status-race-lock.out |
|
230 A dir/o |
|
231 R dir/nested/m |
|
232 ? dir/n |
|
233 ? p |
|
234 ? q |
|
235 $ cat $TESTTMP/status-race-lock.log |
|
236 |
|
237 final cleanup |
|
238 |
|
239 $ rm $TESTTMP/status-race-lock $TESTTMP/status-race-lock.waiting |
|
240 $ cd .. |