comparison tests/test-prev-next.t @ 1742:970a4c13ebc3 stable

evolve: lock the working copy early in next and prev (issue5244) Both next and prev depend on a consistent working copy, but were waiting to take the lock until they were ready to alter the working copy. Take the lock before reading the working copy state, and do not release it until we're definitely not going to change the working copy.
author Simon Farnsworth <simonfar@fb.com>
date Sun, 16 Oct 2016 09:52:53 -0700
parents b4dfafda72c2
children 299cdaa24fa5
comparison
equal deleted inserted replaced
1741:8c05184672ae 1742:970a4c13ebc3
204 [1] 204 [1]
205 $ hg evolve -r 5 205 $ hg evolve -r 5
206 move:[5] added d 206 move:[5] added d
207 atop:[6] added b (3) 207 atop:[6] added b (3)
208 working directory is now at 47ea25be8aea 208 working directory is now at 47ea25be8aea
209
210 prev and next should lock properly against other commands
211
212 $ hg init repo
213 $ cd repo
214 $ HGEDITOR=${TESTDIR}/fake-editor.sh
215 $ echo hi > foo
216 $ hg ci -Am 'one'
217 adding foo
218 $ echo bye > foo
219 $ hg ci -Am 'two'
220
221 $ hg amend --edit &
222 $ sleep 1
223 $ hg prev
224 waiting for lock on working directory of $TESTTMP/repo held by '*' (glob)
225 got lock after [4-6] seconds (re)
226 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
227 [0] one
228 $ wait
229
230 $ hg amend --edit &
231 $ sleep 1
232 $ hg next --evolve
233 waiting for lock on working directory of $TESTTMP/repo held by '*' (glob)
234 1 new unstable changesets
235 got lock after [4-6] seconds (re)
236 move:[2] two
237 atop:[3] one
238 working directory now at a7d885c75614
239 $ wait