fromupstream: pause again if a conflict isn't resolved

Typically this happens when the user forgets to run `git am --continue`
or similar, like so:

    $ fromupstream pw://12345 --bug chromium:123 --test "not really"
    ...
    Please resolve the conflicts and restart the shell job when done. …
    $ (fix the conflicts)
    $ git add foo.be
    $ fg

Previously, this would add TEST=, BUG=, etc. to whatever was at HEAD
before, which is quite annoying and not immediately obvious. Now it'll
show an error and pause the script again.

BUG=None
TEST=`fromupstream msgid://20190420112217.27590-15-hdegoede@redhat.com --buganizer 14987353 --test TODO`
     then `fg` immediately (multiple times if you like). Then run `git
     am --continue` and run `fg` one last time; it should then succeed.

Change-Id: Iaf28883ef4fbd58db812ffc7ce7ed4c7158dd1dc
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/dev-util/+/2067942
Commit-Queue: Harry Cutts <hcutts@chromium.org>
Tested-by: Harry Cutts <hcutts@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
1 file changed