dispatch: factor out command failure handling into a function
Moving the warning generation to a function allows for wrapping and
alternative error handling.
pypy: fix overeager pattern matching on mpatchError
Pypy have difference in error reporting.
mpatch: unify mpatchError (
issue5182)
The pure version was mpatch was throwing struct.error or ValueError
for errors, whereas the C version was throwing an "mpatch.mpatchError".
Introducing an mpatch.mpatchError into pure and using it consistently
is fairly easy, but the actual form for it is mercurial.mpatch.mpatchError,
so with this commit, we change the C implementation to match the naming
convention too.