Show More
@@ -196,3 +196,58 b' final cleanup' | |||||
196 |
|
196 | |||
197 | $ rm $TESTTMP/status-race-lock $TESTTMP/status-race-lock.waiting |
|
197 | $ rm $TESTTMP/status-race-lock $TESTTMP/status-race-lock.waiting | |
198 | $ cd .. |
|
198 | $ cd .. | |
|
199 | ||||
|
200 | Race with a `hg update` | |||
|
201 | ----------------------- | |||
|
202 | ||||
|
203 | $ cp -a reference-repo race-with-update | |||
|
204 | $ cd race-with-update | |||
|
205 | ||||
|
206 | spin a `hg status` with some caches to update | |||
|
207 | ||||
|
208 | $ hg st >$TESTTMP/status-race-lock.out 2>$TESTTMP/status-race-lock.log \ | |||
|
209 | > --config rhg.on-unsupported=abort \ | |||
|
210 | > --config devel.sync.dirstate.pre-read-file=$TESTTMP/status-race-lock \ | |||
|
211 | > & | |||
|
212 | $ $RUNTESTDIR/testlib/wait-on-file 5 $TESTTMP/status-race-lock.waiting | |||
|
213 | do an update | |||
|
214 | ||||
|
215 | $ hg status | |||
|
216 | A dir/o | |||
|
217 | R dir/nested/m | |||
|
218 | ? dir/n | |||
|
219 | ? p | |||
|
220 | ? q | |||
|
221 | $ hg log -GT '{node|short} {desc}\n' | |||
|
222 | @ 9a86dcbfb938 more files to have two commit | |||
|
223 | | | |||
|
224 | o 4f23db756b09 recreate a bunch of files to facilitate dirstate-v2 append | |||
|
225 | ||||
|
226 | $ hg update --merge .^ | |||
|
227 | 0 files updated, 0 files merged, 6 files removed, 0 files unresolved | |||
|
228 | $ touch $TESTTMP/status-race-lock | |||
|
229 | $ wait | |||
|
230 | $ hg log -GT '{node|short} {desc}\n' | |||
|
231 | o 9a86dcbfb938 more files to have two commit | |||
|
232 | | | |||
|
233 | @ 4f23db756b09 recreate a bunch of files to facilitate dirstate-v2 append | |||
|
234 | ||||
|
235 | $ hg status | |||
|
236 | A dir/o | |||
|
237 | ? dir/n | |||
|
238 | ? p | |||
|
239 | ? q | |||
|
240 | ||||
|
241 | The status process should return a consistent result and not crash. | |||
|
242 | ||||
|
243 | $ cat $TESTTMP/status-race-lock.out | |||
|
244 | A dir/o | |||
|
245 | ? dir/n | |||
|
246 | ? p | |||
|
247 | ? q | |||
|
248 | $ cat $TESTTMP/status-race-lock.log | |||
|
249 | ||||
|
250 | final cleanup | |||
|
251 | ||||
|
252 | $ rm $TESTTMP/status-race-lock $TESTTMP/status-race-lock.waiting | |||
|
253 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now