--- versioncontrol/mercurial/src/org/netbeans/modules/mercurial/util/HgUtils.java +++ versioncontrol/mercurial/src/org/netbeans/modules/mercurial/util/HgUtils.java @@ -216,7 +216,7 @@ */ public static boolean isIgnored(File file){ if (file == null) return true; - String name = file.getName(); + String name = file.getPath(); File topFile = Mercurial.getInstance().getTopmostManagedParent(file); // We assume that the toplevel directory should not be ignored. @@ -229,7 +229,7 @@ for (Iterator i = patterns.iterator(); i.hasNext();) { Pattern pattern = (Pattern) i.next(); - if (pattern.matcher(name).matches()) { + if (pattern.matcher(name).find()) { return true; } }