summaryrefslogtreecommitdiff
path: root/usr/src/tools/scripts/git-pbchk.py
diff options
context:
space:
mode:
authorJoshua M. Clulow <josh@sysmgr.org>2014-11-05 12:16:16 -0800
committerDan McDonald <danmcd@omniti.com>2014-11-07 20:42:41 -0500
commite55874358132a4aa6132178335bf567ca79c87c3 (patch)
treebbb4c736cfad11f914cde0a77832390c41bcee8c /usr/src/tools/scripts/git-pbchk.py
parentb515258426fed6c7311fd3f1dea697cfbd4085c6 (diff)
downloadillumos-joyent-e55874358132a4aa6132178335bf567ca79c87c3.tar.gz
5287 git-pbchk should not depend on mercurial
Reviewed by: Richard Lowe <richlowe@richlowe.net> Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com> Approved by: Dan McDonald <danmcd@omniti.com>
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 55d80d8f3f..fd16e109b2 100644
--- a/usr/src/tools/scripts/git-pbchk.py
+++ b/usr/src/tools/scripts/git-pbchk.py
@@ -18,6 +18,7 @@
# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
# Copyright 2008, 2012 Richard Lowe
# Copyright 2014 Garrett D'Amore <garrett@damore.org>
+# Copyright (c) 2014, Joyent, Inc.
#
import getopt
@@ -29,10 +30,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
@@ -48,6 +45,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, ManLint, Mapfile
@@ -178,10 +176,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):