Rejected hunk error message on Arcanist builds

On of our projects at Automattic, we’re using Phabricator on Git. I’ve been working on one of my diffs for a couple of days. After a while, builds started to fail with a message like this:

Hunk #1 applied cleanly.
Hunk #2 applied cleanly.
Rejected hunk #3.
Hunk #4 applied cleanly.
Hunk #5 applied cleanly.
Hunk #6 applied cleanly.
Usage Exception: Unable to apply patch!
 Exception
The program is attempting to read user input, but stdin is being piped from some other source (not a TTY).
(Run with `--trace` for a full exception trace.)
Process exited with code 1

After reading up on this a bit, I’ve suspected that maybe there were some changes on trunk that my patch was out-of-sync-with. However, applying the patch from an up-to-date trunk produced no conflicts:

git checkout trunk
git pull
arc patch D1234

I’ve also checked running rebase on the feature branch, but that was also finished without conflicts:

git checkout trunk
git pull
git checkout feature-branch
git rebase trunk

Even though I couldn’t reproduce the same error locally, updating the diff with the rebased branch resolved the issue:

arc diff --update D1234

Leave a Reply

Discover more from Gergely Csécsey

Subscribe now to keep reading and get access to the full archive.

Continue reading