D1033: pycompat: define operating system constants

spectral (Kyle Lippincott) phabricator at mercurial-scm.org
Thu Oct 12 14:18:08 EDT 2017


spectral added inline comments.

INLINE COMMENTS

> pycompat.py:24
> +isposix = os.name == r'posix'
> +iswindows = os.name == r'nt'
> +

Since osname might be different (encoding or whatever) depending on python version,  I think moving these after the 'if ispy3/else' block below and using something like:

isdarwin = sysplatform == 'darwin'
isposix = osname == 'posix'
iswindows = osname == 'nt'

would be better.

REPOSITORY
  rHG Mercurial

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

To: quark, #hg-reviewers
Cc: spectral, mercurial-devel


More information about the Mercurial-devel mailing list