# HG changeset patch # User Augie Fackler # Date 1533881206 14400 # Node ID b53ec524420b65e19102605b5f45aba9a75bebc1 # Parent d722020bbd9d528cd7ca392de9a7ef4d3f12342d mq: use stringutil.pprint instead of pycompat.byterepr Resolves a few output changes on Python 3 in test-mq.t, and gets us two new passing tests. Differential Revision: https://phab.mercurial-scm.org/D4248 diff -r d722020bbd9d -r b53ec524420b contrib/python3-whitelist --- a/contrib/python3-whitelist Thu Aug 09 13:27:05 2018 -0400 +++ b/contrib/python3-whitelist Fri Aug 10 02:06:46 2018 -0400 @@ -301,6 +301,7 @@ test-minifileset.py test-minirst.py test-mq-git.t +test-mq-guards.t test-mq-header-date.t test-mq-header-from.t test-mq-merge.t @@ -313,6 +314,7 @@ test-mq-qimport-fail-cleanup.t test-mq-qnew.t test-mq-qpush-exact.t +test-mq-qpush-fail.t test-mq-qqueue.t test-mq-qrefresh-interactive.t test-mq-qrefresh-replace-log-message.t diff -r d722020bbd9d -r b53ec524420b hgext/mq.py --- a/hgext/mq.py Thu Aug 09 13:27:05 2018 -0400 +++ b/hgext/mq.py Fri Aug 10 02:06:46 2018 -0400 @@ -662,13 +662,13 @@ exactneg = [g for g in patchguards if g.startswith('-') and g[1:] in guards] if exactneg: - return False, pycompat.byterepr(exactneg[0]) + return False, stringutil.pprint(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, pycompat.byterepr(exactpos[0]) - return False, ' '.join([pycompat.byterepr(p) for p in pos]) + return True, stringutil.pprint(exactpos[0]) + return False, ' '.join([stringutil.pprint(p) for p in pos]) return True, '' def explainpushable(self, idx, all_patches=False):