D1020: largefiles: do not use platform.system()

ryanmce (Ryan McElroy) phabricator at mercurial-scm.org
Thu Oct 12 10:56:31 EDT 2017


ryanmce requested changes to this revision.
ryanmce added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> lfutil.py:83
>              return os.path.join(appdata, longname)
> -    elif platform.system() == 'Darwin':
> +    elif pycompat.sysplatform == 'darwin':
>          home = encoding.environ.get('HOME')

why is this not a pycompat.osname check? It doesn't make sense to abort below with pycompat.osname if that might still be posix.

To be clear, your patch isn't making this worse, but it's exposing something sketchy. Either we need the Abort below to include the sysplatform in its output or we need this check to be against pycombat.osname.

I suspect we want to change the abort below, in a separate patch.

REPOSITORY
  rHG Mercurial

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

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


More information about the Mercurial-devel mailing list