Index: MercurialInterceptor.java =================================================================== RCS file: /shared/data/ccvs/repository/versioncontrol/mercurial/src/org/netbeans/modules/mercurial/MercurialInterceptor.java,v --- MercurialInterceptor.java 5 Nov 2007 15:57:14 -0000 1.15 +++ MercurialInterceptor.java 19 Nov 2007 12:01:12 -0000 @@ -76,6 +76,7 @@ public boolean beforeDelete(File file) { if (file == null) return true; + if (HgUtils.isPartOfMercurialMetadata(file)) return false; // We track the deletion of top level directories if (file.isDirectory()) { @@ -108,12 +109,15 @@ if (file == null) return; Mercurial hg = Mercurial.getInstance(); final File root = hg.getTopmostManagedParent(file); - if (root == null) return; - RequestProcessor rp = hg.getRequestProcessor(root.getAbsolutePath()); + RequestProcessor rp = null; + if (root != null) { + rp = hg.getRequestProcessor(root.getAbsolutePath()); + } if (file.exists()) { if (file.isDirectory()) { file.delete(); if (!dirsToDelete.remove(file)) return; + if (root == null) return; HgProgressSupport support = new HgProgressSupport() { public void perform() { try { @@ -150,6 +154,7 @@ // If we are deleting a parent directory of this file // skip the call to hg remove as we will do it for the directory file.delete(); + if (root == null) return; for (File dir : dirsToDelete) { File tmpFile = file; do {