##// END OF EJS Templates
copies: properly match result during changeset centric copy tracing...
copies: properly match result during changeset centric copy tracing By filtering "during" the iteration we were excluding rename information that were not in the matched set but that file served as base information for the matched set. We now do all copy tracing matching at the end of the process to ensure we raise proper result. If we were aggregating information top down instead of bottom up we could do filtering during processing. However, we don't. Differential Revision: https://phab.mercurial-scm.org/D9585

File last commit:

r46659:9be5db61 default
r46774:92905484 default
Show More
phab-refresh-stack.sh
41 lines | 1.1 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
phab-refresh: do not pick draft changeset from the bare "default" branch...
r46658 revision_in_stack=`hg log \
--rev '.#stack and ::. and topic()' \
-T '\nONE-REV\n' \
| grep 'ONE-REV' | wc -l`
revision_on_phab=`hg log \
--rev '.#stack and ::. and topic() and desc("re:\nDifferential Revision: [^\n]+D\d+$")'\
-T '\nONE-REV\n' \
| grep 'ONE-REV' | wc -l`
contrib: add a small script to refresh all diff in the current stack...
r46605
if [[ $revision_in_stack -eq 0 ]]; then
echo "stack is empty" >&2
phab-refresh: do not error out when the stack is empty...
r46637 exit 0
contrib: add a small script to refresh all diff in the current stack...
r46605 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 \
phab-refresh: do not pick draft changeset from the bare "default" branch...
r46658 phabsend --rev '.#stack and ::. and topic()' \
phab-refresh: allow passing additional argument to the phabsend...
r46659 "$@"