##// END OF EJS Templates
run-tests: allow some slack about 'waiting on lock' message...
run-tests: allow some slack about 'waiting on lock' message It is common to run the tests on very loaded machine when concurrent run might take a bit longer. Such message are usually harmless, but anoying as they break the tests. Test that explicitly depends on this value have been adjusted. This make them more robust anyway. A fun case was `test-clone-pull-corruption.t` which, without the previous changeset introducing extra flushing, ended use having a line 31 (`pulling from ../source`) changing order because the warning message was no longer flushing stdin before using stderr (stderr being invisible in the test). Differential Revision: https://phab.mercurial-scm.org/D9507

File last commit:

r46605:5de27798 default
r46636:f44b9c72 default
Show More
phab-refresh-stack.sh
34 lines | 1.0 KiB | application/x-sh | BashLexer
/ contrib / phab-refresh-stack.sh
contrib: add a small script to refresh all diff in the current stack...
r46605 #!/bin/bash
set -eu
revision_in_stack=`hg log --rev '.#stack and ::.' -T '\nONE-REV\n' | grep 'ONE-REV' | wc -l`
revision_on_phab=`hg log --rev '.#stack and ::. and desc("re:\nDifferential Revision: [^\n]+D\d+$")' -T '\nONE-REV\n' | grep 'ONE-REV' | wc -l`
if [[ $revision_in_stack -eq 0 ]]; then
echo "stack is empty" >&2
exit 1
fi
if [[ $revision_on_phab -eq 0 ]]; then
echo "no tracked diff in this stack" >&2
exit 0
fi
if [[ $revision_on_phab -lt $revision_in_stack ]]; then
echo "not all stack changesets (${revision_in_stack}) have matching Phabricator Diff (${revision_on_phab})" >&2
exit 2
fi
if [[ "$PHABRICATOR_TOKEN" == "" ]]; then
echo 'missing $PHABRICATOR_TOKEN variable' >&2
exit 2
fi
hg \
--config extensions.phabricator= \
--config phabricator.url=https://phab.mercurial-scm.org/ \
--config phabricator.callsign=HG \
--config auth.phabricator.schemes=https \
--config auth.phabricator.prefix=phab.mercurial-scm.org \
--config auth.phabricator.phabtoken=$PHABRICATOR_TOKEN \
phabsend --rev '.#stack and ::.'