Show More
@@ -141,3 +141,58 b' final cleanup' | |||
|
141 | 141 | |
|
142 | 142 | $ rm $TESTTMP/status-race-lock $TESTTMP/status-race-lock.waiting |
|
143 | 143 | $ cd .. |
|
144 | ||
|
145 | Race with a `hg commit` | |
|
146 | ----------------------- | |
|
147 | ||
|
148 | $ cp -a reference-repo race-with-commit | |
|
149 | $ cd race-with-commit | |
|
150 | ||
|
151 | spin a `hg status with some cache to update | |
|
152 | ||
|
153 | $ hg st >$TESTTMP/status-race-lock.out 2>$TESTTMP/status-race-lock.log \ | |
|
154 | > --config rhg.on-unsupported=abort \ | |
|
155 | > --config devel.sync.dirstate.pre-read-file=$TESTTMP/status-race-lock \ | |
|
156 | > & | |
|
157 | $ $RUNTESTDIR/testlib/wait-on-file 5 $TESTTMP/status-race-lock.waiting | |
|
158 | ||
|
159 | Add a do a commit | |
|
160 | ||
|
161 | $ hg status | |
|
162 | A dir/o | |
|
163 | R dir/nested/m | |
|
164 | ? dir/n | |
|
165 | ? p | |
|
166 | ? q | |
|
167 | $ hg commit -m 'racing commit' | |
|
168 | $ touch $TESTTMP/status-race-lock | |
|
169 | $ wait | |
|
170 | ||
|
171 | commit was created, and status is now clean | |
|
172 | ||
|
173 | $ hg log -GT '{node|short} {desc}\n' | |
|
174 | @ 02a67a77ee9b racing commit | |
|
175 | | | |
|
176 | o 9a86dcbfb938 more files to have two commit | |
|
177 | | | |
|
178 | o 4f23db756b09 recreate a bunch of files to facilitate dirstate-v2 append | |
|
179 | ||
|
180 | $ hg status | |
|
181 | ? dir/n | |
|
182 | ? p | |
|
183 | ? q | |
|
184 | ||
|
185 | The status process should return a consistent result and not crash. | |
|
186 | ||
|
187 | $ cat $TESTTMP/status-race-lock.out | |
|
188 | M dir/o (known-bad-output no-rhg !) | |
|
189 | ? dir/n | |
|
190 | ? p | |
|
191 | ? q | |
|
192 | $ cat $TESTTMP/status-race-lock.log | |
|
193 | warning: ignoring unknown working parent 02a67a77ee9b! (known-bad-output no-rhg !) | |
|
194 | ||
|
195 | final cleanup | |
|
196 | ||
|
197 | $ rm $TESTTMP/status-race-lock $TESTTMP/status-race-lock.waiting | |
|
198 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now