This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 122123
Collapse All | Expand All

(-)MercurialInterceptor.java (-2 / +7 lines)
Lines 76-81 Link Here
76
76
77
    public boolean beforeDelete(File file) {
77
    public boolean beforeDelete(File file) {
78
        if (file == null) return true;
78
        if (file == null) return true;
79
        if (HgUtils.isPartOfMercurialMetadata(file)) return false;
79
        
80
        
80
        // We track the deletion of top level directories
81
        // We track the deletion of top level directories
81
        if (file.isDirectory()) {
82
        if (file.isDirectory()) {
Lines 108-119 Link Here
108
        if (file == null) return;
109
        if (file == null) return;
109
        Mercurial hg = Mercurial.getInstance();
110
        Mercurial hg = Mercurial.getInstance();
110
        final File root = hg.getTopmostManagedParent(file);
111
        final File root = hg.getTopmostManagedParent(file);
111
        if (root == null) return;
112
        RequestProcessor rp = null;
112
        RequestProcessor rp = hg.getRequestProcessor(root.getAbsolutePath());
113
        if (root != null) {
114
            rp = hg.getRequestProcessor(root.getAbsolutePath());
115
        }
113
        if (file.exists()) {
116
        if (file.exists()) {
114
            if (file.isDirectory()) {
117
            if (file.isDirectory()) {
115
                file.delete();
118
                file.delete();
116
                if (!dirsToDelete.remove(file)) return;
119
                if (!dirsToDelete.remove(file)) return;
120
                if (root == null) return;
117
                HgProgressSupport support = new HgProgressSupport() {
121
                HgProgressSupport support = new HgProgressSupport() {
118
                    public void perform() {
122
                    public void perform() {
119
                        try {
123
                        try {
Lines 150-155 Link Here
150
                // If we are deleting a parent directory of this file
154
                // If we are deleting a parent directory of this file
151
                // skip the call to hg remove as we will do it for the directory
155
                // skip the call to hg remove as we will do it for the directory
152
                file.delete();
156
                file.delete();
157
                if (root == null) return;
153
                for (File dir : dirsToDelete) {
158
                for (File dir : dirsToDelete) {
154
                    File tmpFile = file;
159
                    File tmpFile = file;
155
                    do {
160
                    do {

Return to bug 122123