Patchwork D3216: py3: use pycompat.byterepr() instead of repr()

login
register
mail settings
Submitter phabricator
Date April 11, 2018, 9:26 a.m.
Message ID <8bcd3c3844a2fd38f82ba1989a826f00@localhost.localdomain>
Download mbox | patch
Permalink /patch/30673/
State Not Applicable
Headers show

Comments

phabricator - April 11, 2018, 9:26 a.m.
pulkit updated this revision to Diff 7962.
pulkit retitled this revision from "py3: use pycompat.bytestr() where repr in involved" to "py3: use pycompat.byterepr() instead of repr()".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3216?vs=7928&id=7962

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

AFFECTED FILES
  hgext/mq.py

CHANGE DETAILS




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

Patch

diff --git a/hgext/mq.py b/hgext/mq.py
--- a/hgext/mq.py
+++ b/hgext/mq.py
@@ -661,13 +661,13 @@ 
         exactneg = [g for g in patchguards
                     if g.startswith('-') and g[1:] in guards]
         if exactneg:
-            return False, repr(exactneg[0])
+            return False, pycompat.byterepr(exactneg[0])
         pos = [g for g in patchguards if g.startswith('+')]
         exactpos = [g for g in pos if g[1:] in guards]
         if pos:
             if exactpos:
-                return True, repr(exactpos[0])
-            return False, ' '.join(map(repr, pos))
+                return True, pycompat.byterepr(exactpos[0])
+            return False, ' '.join([pycompat.byterepr(p) for p in pos])
         return True, ''
 
     def explainpushable(self, idx, all_patches=False):