# HG changeset patch # User Jun Wu # Date 1507861204 25200 # Node ID c0a6c19690ff0e424df0897aa0ce3e9dd44f637b # Parent f42dec9c976e8059a44edda5db47352df0a93b4a pycompat: define operating system constants As suggested by Ryan in D1019, it's cleaner if we use defined constants instead of `osname == 'nt'` everywhere. Differential Revision: https://phab.mercurial-scm.org/D1033 diff -r f42dec9c976e -r c0a6c19690ff mercurial/pycompat.py --- a/mercurial/pycompat.py Wed Oct 11 21:24:32 2017 -0700 +++ b/mercurial/pycompat.py Thu Oct 12 19:20:04 2017 -0700 @@ -316,3 +316,7 @@ rawinput = raw_input isjython = sysplatform.startswith('java') + +isdarwin = sysplatform == 'darwin' +isposix = osname == 'posix' +iswindows = osname == 'nt'