Changeset View
Changeset View
Standalone View
Standalone View
contrib/source-control-tools/apply-revision.sh
Show First 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | |||||
# Pull the patch from Phabricator and rebase it on latest master | # Pull the patch from Phabricator and rebase it on latest master | ||||
"${TOPLEVEL}"/contrib/source-control-tools/autopatch.sh --revision "${REVISION}" | "${TOPLEVEL}"/contrib/source-control-tools/autopatch.sh --revision "${REVISION}" | ||||
# Stop logging verbosely to prevent leaking CONDUIT_TOKEN | # Stop logging verbosely to prevent leaking CONDUIT_TOKEN | ||||
set +x | set +x | ||||
# Check that the revision is ready to land (tests passed, etc.) | # Check that the revision is ready to land (tests passed, etc.) | ||||
: | arc land --hold --revision "${REVISION}" --conduit-token "${CONDUIT_TOKEN}" | : | arc land --hold --revision "${REVISION}" --conduit-token "${CONDUIT_TOKEN}" | ||||
set -x | set -x | ||||
# `arc land --hold` still detaches the git HEAD. master should contain the | |||||
# changes we expect to land, so switch back to it. | |||||
if [ -n "$(git diff HEAD master)" ]; then | |||||
echo "Error: Unexpected mismatch between HEAD and master" | |||||
exit 10 | |||||
fi | |||||
git checkout master -- |