D7020: pycompat: implement a shlexquote that properly handles bytes

2019-10-09 Thread indygreg (Gregory Szorc)
indygreg added a comment. indygreg abandoned this revision. Yuya's patch fixed the test failure and is a better solution. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7020/new/ REVISION DETAIL https://phab.mercurial-scm.org/D7020 To: indygreg, #hg

D7020: pycompat: implement a shlexquote that properly handles bytes

2019-10-08 Thread yuja (Yuya Nishihara)
yuja added a comment. See https://www.mercurial-scm.org/pipermail/mercurial-devel/2019-October/134352.html REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7020/new/ REVISION DETAIL https://phab.mercurial-scm.org/D7020 To: indygreg, #hg-reviewers Cc:

Re: D7020: pycompat: implement a shlexquote that properly handles bytes

2019-10-08 Thread Yuya Nishihara
See https://www.mercurial-scm.org/pipermail/mercurial-devel/2019-October/134352.html ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

D7020: pycompat: implement a shlexquote that properly handles bytes

2019-10-08 Thread indygreg (Gregory Szorc)
indygreg added inline comments. INLINE COMMENTS > marmoute wrote in pycompat.py:343 > It might be a silly questions, but why are we going through `latin-1` instead > of `utf-8` or any other crazy encoding ? Because the underlying string is likely raw bytes and `latin-1` will preserve those cod

D7020: pycompat: implement a shlexquote that properly handles bytes

2019-10-08 Thread marmoute (Pierre-Yves David)
marmoute added inline comments. INLINE COMMENTS > pycompat.py:343 > +s = shlex.quote(s) > +return s.encode('latin-1') > + It might be a silly questions, but why are we going through `latin-1` instead of `utf-8` or any other crazy encoding ? REPOSITORY rHG Mercurial CHANGES S

D7020: pycompat: implement a shlexquote that properly handles bytes

2019-10-07 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY 2cc453284d5 introduced this function call to for mail.py. This broke Python 3 becau