# HG changeset patch # User Pierre-Yves David # Date 1607207277 -3600 # Node ID 024f90fc01b55f3c76f43e17ae3f9fa0fda5a85c # Parent 1bf2b44c40078c4e17479a1625c57370dc7750ec phab-refresh: do not pick draft changeset from the bare "default" branch My initial test overlooked a common case: draft changeset on the default branch. So right now, heptapod is doing a final refresh of the patch with the landed version. This is not a bit problem except for the extra noise. However we would be better without the noise. Differential Revision: https://phab.mercurial-scm.org/D9522 diff -r 1bf2b44c4007 -r 024f90fc01b5 contrib/phab-refresh-stack.sh --- a/contrib/phab-refresh-stack.sh Tue Dec 01 20:22:24 2020 +0900 +++ b/contrib/phab-refresh-stack.sh Sat Dec 05 23:27:57 2020 +0100 @@ -1,8 +1,14 @@ #!/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` +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` if [[ $revision_in_stack -eq 0 ]]; then echo "stack is empty" >&2 @@ -31,4 +37,4 @@ --config auth.phabricator.schemes=https \ --config auth.phabricator.prefix=phab.mercurial-scm.org \ --config auth.phabricator.phabtoken=$PHABRICATOR_TOKEN \ -phabsend --rev '.#stack and ::.' +phabsend --rev '.#stack and ::. and topic()' \