From patchwork Thu May 4 22:46:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [03,of,10] py3: use %s instead of %b to print a list From: Pulkit Goyal <7895pulkit@gmail.com> X-Patchwork-Id: 20443 Message-Id: <100e7fc11bf088bfa585.1493938008@pulkit-goyal> To: mercurial-devel@mercurial-scm.org Date: Fri, 05 May 2017 04:16:48 +0530 # HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 1493837589 -19800 # Thu May 04 00:23:09 2017 +0530 # Node ID 100e7fc11bf088bfa58532680f8917bf3750599f # Parent b686f18461301572e82a1d85b2691d1d1d7f27b5 py3: use %s instead of %b to print a list Here pats is a list obviously. We add u'' to make sure %s don't get converted to %b by the transformer. r'' is not used because then \n won't be interpreted as newline. diff -r b686f1846130 -r 100e7fc11bf0 hgext/largefiles/overrides.py --- a/hgext/largefiles/overrides.py Wed May 03 15:41:28 2017 +0530 +++ b/hgext/largefiles/overrides.py Thu May 04 00:23:09 2017 +0530 @@ -381,7 +381,7 @@ return r m.matchfn = lfmatchfn - ui.debug('updated patterns: %s\n' % sorted(pats)) + ui.debug(u'updated patterns: %s\n' % sorted(pats)) return m, pats # For hg log --patch, the match object is used in two different senses: