[PATCH 03 of 10 py3] error: use r-string to properly pop hints from **kw

Augie Fackler raf at durin42.com
Sun Mar 19 14:26:16 EDT 2017


# HG changeset patch
# User Augie Fackler <augie at google.com>
# Date 1489899762 14400
#      Sun Mar 19 01:02:42 2017 -0400
# Node ID 9c25b4e6ab7bf364a101d8a0bc7c8a196131add8
# Parent  dec51b4b12490adab91d55d46c9db0cb77637a28
error: use r-string to properly pop hints from **kw

Fixes the hint mixin on Python 3.

diff --git a/mercurial/error.py b/mercurial/error.py
--- a/mercurial/error.py
+++ b/mercurial/error.py
@@ -22,7 +22,7 @@ class Hint(object):
     pass remaining arguments to the exception class.
     """
     def __init__(self, *args, **kw):
-        self.hint = kw.pop('hint', None)
+        self.hint = kw.pop(r'hint', None)
         super(Hint, self).__init__(*args, **kw)
 
 class RevlogError(Hint, Exception):


More information about the Mercurial-devel mailing list