Handle merge conflicts upon pulling gracefully
Right now we error out with:
Traceback (most recent call last):
File "/home/rasmus/.local/bin/mkmr", line 4, in <module>
main()
File "/home/rasmus/.local/lib/python3.8/site-packages/mkmr/mkmr.py", line 179, in main
repo.git.pull("--quiet", options.upstream, "--rebase", target_branch)
File "/home/rasmus/.local/lib/python3.8/site-packages/git/cmd.py", line 542, in <lambda>
return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
File "/home/rasmus/.local/lib/python3.8/site-packages/git/cmd.py", line 1005, in _call_process
return self.execute(call, **exec_kwargs)
File "/home/rasmus/.local/lib/python3.8/site-packages/git/cmd.py", line 822, in execute
raise GitCommandError(command, status, stderr_value, stdout_value)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(1)
cmdline: git pull --quiet upstream --rebase master
stdout: 'Patch failed at 0001 community/networkmanager: upgrade to 1.22.10
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".'
stderr: 'error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch'