[PATCH 7 of 8 RFC] vfs: add check pattern for using platform depend file APIs of util.py

FUJIWARA Katsunori foozy at lares.dti.ne.jp
Fri Jun 15 09:45:18 CDT 2012


# HG changeset patch
# User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
# Date 1339768794 -32400
# Node ID 92f563247964eb16671f9868a3839d9eaad598a1
# Parent  ecd42350a3f9cd826b660a5ed1852dfd7d5ae899
vfs: add check pattern for using platform depend file APIs of util.py

diff -r ecd42350a3f9 -r 92f563247964 contrib/check-code.py
--- a/contrib/check-code.py	Fri Jun 15 22:59:54 2012 +0900
+++ b/contrib/check-code.py	Fri Jun 15 22:59:54 2012 +0900
@@ -279,6 +279,11 @@
      'getmtime|getsize|isdir|isfile|islink|ismount|lexists|realpath|relpath|'
      'samefile|samestat|walk)',
      "don't use file API of os.path module directly. use via util.vfs()"),
+    (r'\butil\.(cachestat|checkexec|checklink|copymode|isexec|'
+     'makedir|nlinks|oslink|posixfile|realpath|rename|samedevice|samefile|'
+     'setflags|statfiles|unlink|unlinkpath)([^\w]|$)',
+     "don't use platform depend file API of util module directly."
+     " use via util.vfs()"),
   ]
 ]
 


More information about the Mercurial-devel mailing list