D7504: py3: replace %s by %r on binary format string when needed

matclab (Mathieu Clabaut) phabricator at mercurial-scm.org
Fri Nov 22 08:26:07 EST 2019


matclab added a comment.
matclab abandoned this revision.




INLINE COMMENTS

> dlax wrote in localrepo.py:1571
> The first `%s` was correct I think because `changeid` can be a bytes.
> 
> For the second one, if `%r` is the way to go (I'm not sure), maybe we can drop `pycompat.sysstr()`?

I'm really dumb… 
I encountered the problem in mercurial 5.2 and did the change in mercurial devel without checking that the problem still occurred. I guess that `pycompat.sysstr()` already solves the problem. 
In my opinion `%r` is shorter and cleaner, but I  don't think we need to bother.

Sorry for the noise. I will close the request.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7504/new/

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

To: matclab, #hg-reviewers, dlax
Cc: dlax, mercurial-devel


More information about the Mercurial-devel mailing list