D1646: py3: handle keyword arguments correctly in ui.py

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Sun Dec 10 02:40:59 UTC 2017


pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D1646

AFFECTED FILES
  mercurial/ui.py

CHANGE DETAILS

diff --git a/mercurial/ui.py b/mercurial/ui.py
--- a/mercurial/ui.py
+++ b/mercurial/ui.py
@@ -894,9 +894,9 @@
         "cmdname.type" is recommended. For example, status issues
         a label of "status.modified" for modified files.
         '''
-        if self._buffers and not opts.get('prompt', False):
+        if self._buffers and not opts.get(r'prompt', False):
             if self._bufferapplylabels:
-                label = opts.get('label', '')
+                label = opts.get(r'label', '')
                 self._buffers[-1].extend(self.label(a, label) for a in args)
             else:
                 self._buffers[-1].extend(args)
@@ -907,7 +907,7 @@
         else:
             msgs = args
             if self._colormode is not None:
-                label = opts.get('label', '')
+                label = opts.get(r'label', '')
                 msgs = [self.label(a, label) for a in args]
             self._write(*msgs, **opts)
 
@@ -935,7 +935,7 @@
         else:
             msgs = args
             if self._colormode is not None:
-                label = opts.get('label', '')
+                label = opts.get(r'label', '')
                 msgs = [self.label(a, label) for a in args]
             self._write_err(*msgs, **opts)
 



To: pulkit, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list