# HG changeset patch # User Jun Wu # Date 2017-10-12 00:42:57 # Node ID a679aa582d8dedb3368ad7b427be3b504a7d0f47 # Parent bb6544b1c56e5eeffda11a7b05754c9eb3666e62 check-code: forbid platform.system() See the previous patches for the reason. Differential Revision: https://phab.mercurial-scm.org/D1021 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 @@ pypats = [ (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',