patch: fix clash between local variable and exception instance
The local err variable would be bound to PatchError thrown and it
keeps this value even after the except block is executed.
The whole thing worked anyway since the rejected variable is set in
the except block and this makes the function return -1 when a
PatchError is thrown.
.. Common link and substitution definitions.
.. |hg(1)| replace:: **hg**\ (1)
.. _hg(1): hg.1.html
.. |hgrc(5)| replace:: **hgrc**\ (5)
.. _hgrc(5): hgrc.5.html
.. |hgignore(5)| replace:: **hgignore**\ (5)
.. _hgignore(5): hgignore.5.html