D1909: cmdutil: add a kludge to make bytes repr() the same on 2 and 3

yuja (Yuya Nishihara) phabricator at mercurial-scm.org
Sat Jan 27 04:37:25 EST 2018


yuja added a comment.


  I'm thinking of adding a couple of utility functions as this sort of hack
  is unavoidable around the codebase:
  
  - `pycompat.maybebytestr(x)`
  - make `repr(bytestr)` return `repr(bytes)[1:]`
  - `pycompat.rapply(f, xs)` to recursively apply `f = maybebytestr` to dict/list items

REPOSITORY
  rHG Mercurial

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

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


More information about the Mercurial-devel mailing list