##// END OF EJS Templates
test-bookmarks: factor hooks out to a shell script for Windows...
Matt Harbison -
r32077:de115db3 stable
parent child Browse files
Show More
@@ -306,6 +306,12 b' race conditions'
306 $ hg serve -R pull-race -p $HGPORT -d --pid-file=pull-race.pid -E main-error.log
306 $ hg serve -R pull-race -p $HGPORT -d --pid-file=pull-race.pid -E main-error.log
307 $ cat pull-race.pid >> $DAEMON_PIDS
307 $ cat pull-race.pid >> $DAEMON_PIDS
308
308
309 $ cat <<EOF > $TESTTMP/out_makecommit.sh
310 > #!/bin/sh
311 > hg ci -Am5
312 > echo committed in pull-race
313 > EOF
314
309 $ hg clone -q http://localhost:$HGPORT/ pull-race2
315 $ hg clone -q http://localhost:$HGPORT/ pull-race2
310 $ cd pull-race
316 $ cd pull-race
311 $ hg up -q Y
317 $ hg up -q Y
@@ -314,7 +320,7 b' race conditions'
314 $ echo c5 > f3
320 $ echo c5 > f3
315 $ cat <<EOF > .hg/hgrc
321 $ cat <<EOF > .hg/hgrc
316 > [hooks]
322 > [hooks]
317 > outgoing.makecommit = hg ci -Am5; echo committed in pull-race
323 > outgoing.makecommit = sh $TESTTMP/out_makecommit.sh
318 > EOF
324 > EOF
319
325
320 (new config needs a server restart)
326 (new config needs a server restart)
@@ -347,12 +353,21 b' race conditions'
347 Update a bookmark right after the initial lookup -B (issue4689)
353 Update a bookmark right after the initial lookup -B (issue4689)
348
354
349 $ echo c6 > ../pull-race/f3 # to be committed during the race
355 $ echo c6 > ../pull-race/f3 # to be committed during the race
356 $ cat <<EOF > $TESTTMP/listkeys_makecommit.sh
357 > #!/bin/sh
358 > if hg st | grep -q M; then
359 > hg commit -m race
360 > echo committed in pull-race
361 > else
362 > exit 0
363 > fi
364 > EOF
350 $ cat <<EOF > ../pull-race/.hg/hgrc
365 $ cat <<EOF > ../pull-race/.hg/hgrc
351 > [hooks]
366 > [hooks]
352 > # If anything to commit, commit it right after the first key listing used
367 > # If anything to commit, commit it right after the first key listing used
353 > # during lookup. This makes the commit appear before the actual getbundle
368 > # during lookup. This makes the commit appear before the actual getbundle
354 > # call.
369 > # call.
355 > listkeys.makecommit= ((hg st | grep -q M) && (hg commit -m race; echo commited in pull-race)) || exit 0
370 > listkeys.makecommit= sh $TESTTMP/listkeys_makecommit.sh
356 > EOF
371 > EOF
357
372
358 (new config need server restart)
373 (new config need server restart)
General Comments 0
You need to be logged in to leave comments. Login now