Skip to content

Commit

Permalink
Auto merge of #2674 - RalfJung:josh, r=RalfJung
Browse files Browse the repository at this point in the history
change handling of rust-version file in rustc-pull, and add a sanity check in rustc-push
  • Loading branch information
bors committed Nov 17, 2022
2 parents 4ca3e27 + 8e61ed4 commit 8466d2f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions miri
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,13 @@ rustc-pull)
if [ -z "$FETCH_COMMIT" ]; then
FETCH_COMMIT=$(git ls-remote https://github.com/rust-lang/rust/ HEAD | cut -f 1)
fi
# Update rust-version file. As a separate commit, since making it part of
# the merge has confused the heck out of josh in the past.
echo "$FETCH_COMMIT" > rust-version
git commit rust-version -m "Preparing for merge from rustc"
# Fetch given rustc commit and note down which one that was
git fetch http://localhost:8000/rust-lang/rust.git@$FETCH_COMMIT$JOSH_FILTER.git
echo "$FETCH_COMMIT" > rust-version # do this *before* merging as merging will fail in case of conflicts
git merge FETCH_HEAD --no-ff -m "Merge from rustc"
git commit rust-version --amend -m "Merge from rustc"
exit 0
;;
rustc-push)
Expand Down Expand Up @@ -158,6 +160,12 @@ rustc-push)
cd "$MIRIDIR"
echo "Pushing Miri changes..."
git push http://localhost:8000/$USER/rust.git$JOSH_FILTER.git HEAD:$BRANCH
# Do a round-trip check to make sure the push worked as expected.
git fetch http://localhost:8000/$USER/rust.git@$JOSH_FILTER.git $BRANCH
if [[ $(git rev-parse HEAD) != $(git rev-parse FETCH_HEAD) ]]; then
echo "ERROR: Josh created a non-roundtrip push! Do NOT merge this into rustc!"
exit 1
fi
exit 0
;;
many-seeds)
Expand Down

0 comments on commit 8466d2f

Please sign in to comment.