summaryrefslogtreecommitdiff
path: root/usr/src/tools/scripts/git-pbchk.py
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/tools/scripts/git-pbchk.py')
-rw-r--r--usr/src/tools/scripts/git-pbchk.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/usr/src/tools/scripts/git-pbchk.py b/usr/src/tools/scripts/git-pbchk.py
index 656e22f6b4..52c455f10e 100644
--- a/usr/src/tools/scripts/git-pbchk.py
+++ b/usr/src/tools/scripts/git-pbchk.py
@@ -17,6 +17,7 @@
#
# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
# Copyright 2008, 2012 Richard Lowe
+# Copyright (c) 2013, Joyent Inc. All rights reserved.
#
import getopt
@@ -28,10 +29,6 @@ import tempfile
from cStringIO import StringIO
-# This is necessary because, in a fit of pique, we used hg-format ignore lists
-# for NOT files.
-from mercurial import ignore
-
#
# Adjust the load path based on our location and the version of python into
# which it is being loaded. This assumes the normal onbld directory
@@ -47,6 +44,7 @@ sys.path.insert(1, os.path.join(os.path.dirname(__file__), "..", "lib",
#
sys.path.insert(2, os.path.join(os.path.dirname(__file__), ".."))
+from onbld.Scm import Ignore
from onbld.Checks import Comments, Copyright, CStyle, HdrChk
from onbld.Checks import JStyle, Keywords, Mapfile
@@ -177,10 +175,7 @@ def not_check(root, cmd):
ignorefiles = filter(os.path.exists,
[os.path.join(root, ".git", "%s.NOT" % cmd),
os.path.join(root, "exception_lists", cmd)])
- if len(ignorefiles) > 0:
- return ignore.ignore(root, ignorefiles, sys.stderr.write)
- else:
- return lambda x: False
+ return Ignore.ignore(root, ignorefiles)
def gen_files(root, parent, paths, exclude):