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

This is an archive of the discontinued Mercurial Phabricator instance.

largefiles: do not use platform.system()
ClosedPublic

Authored by quark on Oct 11 2017, 8:57 PM.

Details

Summary

See the previous patch for the reason.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

quark created this revision.Oct 11 2017, 8:57 PM
ryanmce requested changes to this revision.Oct 12 2017, 10:56 AM
ryanmce added a subscriber: ryanmce.
ryanmce added inline comments.
hgext/largefiles/lfutil.py
82

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.

This revision now requires changes to proceed.Oct 12 2017, 10:56 AM
quark added inline comments.Oct 12 2017, 11:20 AM
hgext/largefiles/lfutil.py
82

pycompat.osname returns posix on OS X.

quark requested review of this revision.Oct 12 2017, 4:11 PM

I changed it in a later patch.

This revision was automatically updated to reflect the committed changes.