Mercurial > public > mercurial-scm > hg-stable
diff hgext/logtoprocess.py @ 34640:68ed3b4f86ef
logtoprocess: do not use platform.system()
See the previous patch for the reason.
Differential Revision: https://phab.mercurial-scm.org/D1019
author | Jun Wu <quark@fb.com> |
---|---|
date | Wed, 11 Oct 2017 17:38:20 -0700 |
parents | 8e7feaad2d8d |
children | 75979c8d4572 |
line wrap: on
line diff
--- a/hgext/logtoprocess.py Wed Oct 11 17:27:21 2017 -0700 +++ b/hgext/logtoprocess.py Wed Oct 11 17:38:20 2017 -0700 @@ -36,11 +36,13 @@ import itertools import os -import platform import subprocess import sys -from mercurial import encoding +from mercurial import ( + encoding, + pycompat, +) # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should @@ -49,7 +51,7 @@ testedwith = 'ships-with-hg-core' def uisetup(ui): - if platform.system() == 'Windows': + if pycompat.osname == 'nt': # no fork on Windows, but we can create a detached process # https://msdn.microsoft.com/en-us/library/windows/desktop/ms684863.aspx # No stdlib constant exists for this value