D1019: logtoprocess: do not use platform.system()
quark (Jun Wu)
phabricator at mercurial-scm.org
Fri Oct 13 10:05:58 EDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG68ed3b4f86ef: logtoprocess: do not use platform.system() (authored by quark, committed by ).
CHANGED PRIOR TO COMMIT
https://phab.mercurial-scm.org/D1019?vs=2606&id=2678#toc
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D1019?vs=2606&id=2678
REVISION DETAIL
https://phab.mercurial-scm.org/D1019
AFFECTED FILES
hgext/logtoprocess.py
CHANGE DETAILS
diff --git a/hgext/logtoprocess.py b/hgext/logtoprocess.py
--- a/hgext/logtoprocess.py
+++ b/hgext/logtoprocess.py
@@ -36,20 +36,22 @@
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
# be specifying the version(s) of Mercurial they are tested with, or
# leave the attribute unspecified.
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
To: quark, #hg-reviewers, ryanmce
Cc: ryanmce, mercurial-devel
More information about the Mercurial-devel
mailing list