py3: convert key to str to make kwargs.pop work in mq
authorPulkit Goyal <7895pulkit@gmail.com>
Fri, 05 May 2017 04:48:42 +0530
changeset 32239 c6cbd0b66465
parent 32238 76f938ec68a5
child 32240 9d3136638784
py3: convert key to str to make kwargs.pop work in mq The keys are passed here and there as unicodes and our transformer make things bytes. Due to that, mq was not poped and this results in error on Py3. Here we abuse r'' to make that str on Python 3.
hgext/mq.py
--- a/hgext/mq.py	Fri May 05 04:41:45 2017 +0530
+++ b/hgext/mq.py	Fri May 05 04:48:42 2017 +0530
@@ -3540,7 +3540,7 @@
     """Add --mq option to operate on patch repository instead of main"""
 
     # some commands do not like getting unknown options
-    mq = kwargs.pop('mq', None)
+    mq = kwargs.pop(r'mq', None)
 
     if not mq:
         return orig(ui, repo, *args, **kwargs)