From bfb56a46ed22310699783e45d5a609dd541bb536 Mon Sep 17 00:00:00 2001 From: "Joshua M. Clulow" Date: Thu, 17 Jan 2013 22:26:21 +0000 Subject: OS-1823 git-pbchk should not depend on mercurial Reviewed by: Richard Lowe --- usr/src/tools/scripts/git-pbchk.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'usr/src/tools/scripts/git-pbchk.py') 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): -- cgit v1.2.3