Print this page
OS-1823 git-pbchk should not depend on mercurial

@@ -14,10 +14,11 @@
 #
 
 #
 # Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
 # Copyright 2008, 2011 Richard Lowe
+# Copyright (c) 2013, Joyent Inc. All rights reserved.
 #
 
 '''OpenSolaris extensions to Mercurial
 
     This extension contains a number of commands to help you work with

@@ -90,18 +91,19 @@
 # within the source tree.
 #
 sys.path.insert(2, os.path.join(os.path.dirname(__file__), "..", ".."))
 
 from onbld.Scm import Version
+from onbld.Scm import Ignore
 from mercurial import util
 
 try:
     Version.check_version()
 except Version.VersionMismatch, badversion:
     raise util.Abort("Version Mismatch:\n %s\n" % badversion)
 
-from mercurial import cmdutil, ignore, node, patch
+from mercurial import cmdutil, node, patch
 
 from onbld.Scm.WorkSpace import WorkSpace, WorkList
 from onbld.Scm.Backup import CdmBackup
 from onbld.Checks import Cddl, Comments, Copyright, CStyle, HdrChk
 from onbld.Checks import JStyle, Keywords, Mapfile

@@ -165,11 +167,11 @@
                repo.wjoin('exception_lists/%s' % cmd)]:
         if os.path.exists(f):
             ignorefiles.append(f)
 
     if ignorefiles:
-        ign = ignore.ignore(repo.root, ignorefiles, repo.ui.warn)
+        ign = Ignore.ignore(repo.root, ignorefiles)
         return canonified_check(ign)
     else:
         return util.never