D1021: check-code: forbid platform.system()

quark (Jun Wu) phabricator at mercurial-scm.org
Fri Oct 13 10:06:10 EDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rHGa679aa582d8d: check-code: forbid platform.system() (authored by quark, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1021?vs=2634&id=2680

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

AFFECTED FILES
  contrib/check-code.py

CHANGE DETAILS

diff --git a/contrib/check-code.py b/contrib/check-code.py
--- a/contrib/check-code.py
+++ b/contrib/check-code.py
@@ -362,6 +362,7 @@
     (r'\.next\(\)', "don't use .next(), use next(...)"),
     (r'([a-z]*).revision\(\1\.node\(',
      "don't convert rev to node before passing to revision(nodeorrev)"),
+    (r'platform\.system\(\)', "don't use platform.system(), use pycompat"),
 
     # rules depending on implementation of repquote()
     (r' x+[xpqo%APM][\'"]\n\s+[\'"]x',



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


More information about the Mercurial-devel mailing list