match: fix up a repr to not crash on Python 3
authorAugie Fackler <augie@google.com>
Sun, 14 Oct 2018 11:16:22 -0400
changeset 53038 d30a19d1044172d47632d7abb8a8229c5b9c35cf
parent 53037 2c5835b4246be6ea42e4b4c7b42dc23e379e2c23
child 53039 943248e47864e90d82a075f71a72dfe0cbd4905e
push id1060
push usergszorc@mozilla.com
push dateFri, 19 Oct 2018 16:51:18 +0000
match: fix up a repr to not crash on Python 3 Differential Revision: https://phab.mercurial-scm.org/D5120
mercurial/match.py
--- a/mercurial/match.py
+++ b/mercurial/match.py
@@ -1168,17 +1168,17 @@ def _buildmatch(kindpats, globsuffix, li
             dirs = {p for k, p, s in kindpats}
             def mf(f):
                 i = f.rfind('/')
                 if i >= 0:
                     dir = f[:i]
                 else:
                     dir = '.'
                 return dir in dirs
-            regex = b'rootfilesin: %s' % sorted(dirs)
+            regex = b'rootfilesin: %s' % stringutil.pprint(list(sorted(dirs)))
             matchfuncs.append(mf)
         else:
             regex, mf = _buildregexmatch(kindpats, globsuffix)
             matchfuncs.append(mf)
 
     if len(matchfuncs) == 1:
         return regex, matchfuncs[0]
     else: