Patchwork D2549: debugcommands: fix repr in debugignore print with pycompat.bytestr

login
register
mail settings
Submitter phabricator
Date March 2, 2018, 2:51 p.m.
Message ID <differential-rev-PHID-DREV-xuvoudsbi6cbfligdwo5-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/28686/
State Superseded
Headers show

Comments

phabricator - March 2, 2018, 2:51 p.m.
durin42 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/D2549

AFFECTED FILES
  mercurial/debugcommands.py

CHANGE DETAILS




To: durin42, #hg-reviewers
Cc: mercurial-devel
phabricator - March 2, 2018, 4:08 p.m.
yuja requested changes to this revision.
yuja added a comment.
This revision now requires changes to proceed.


  `pycompat.byterepr()` or `"%r\n" %` is preferred.

REPOSITORY
  rHG Mercurial

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

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

Patch

diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py
--- a/mercurial/debugcommands.py
+++ b/mercurial/debugcommands.py
@@ -1005,7 +1005,7 @@ 
     ignore = repo.dirstate._ignore
     if not files:
         # Show all the patterns
-        ui.write("%s\n" % repr(ignore))
+        ui.write("%s\n" % pycompat.bytestr(ignore))
     else:
         m = scmutil.match(repo[None], pats=files)
         for f in m.files():