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 126062
Collapse All | Expand All

(-)a/mercurial/src/org/netbeans/modules/mercurial/MercurialInterceptor.java (+6 lines)
Lines 235-240 public class MercurialInterceptor extend Link Here
235
        Runnable moveImpl = new Runnable() {
235
        Runnable moveImpl = new Runnable() {
236
            public void run() {
236
            public void run() {
237
                try {
237
                try {
238
                    if (srcFile.isDirectory()) {
239
                        srcFile.renameTo(dstFile);
240
                        HgCommand.doRenameAfter(root, srcFile, dstFile);
241
                        return;
242
                    }
238
                    int status = hg.getFileStatusCache().getStatus(srcFile).getStatus();
243
                    int status = hg.getFileStatusCache().getStatus(srcFile).getStatus();
239
                    if (status == FileInformation.STATUS_NOTVERSIONED_NEWLOCALLY) {
244
                    if (status == FileInformation.STATUS_NOTVERSIONED_NEWLOCALLY) {
240
                        srcFile.renameTo(dstFile);
245
                        srcFile.renameTo(dstFile);
Lines 334-339 public class MercurialInterceptor extend Link Here
334
339
335
        HgProgressSupport supportCreate = new HgProgressSupport() {
340
        HgProgressSupport supportCreate = new HgProgressSupport() {
336
            public void perform() {
341
            public void perform() {
342
                Mercurial.LOG.log(Level.FINE, "fileChangedImpl(): File: {0}", file); // NOI18N
337
                cache.refresh(file, FileStatusCache.REPOSITORY_STATUS_UNKNOWN);
343
                cache.refresh(file, FileStatusCache.REPOSITORY_STATUS_UNKNOWN);
338
            }
344
            }
339
        };
345
        };
(-)a/mercurial/src/org/netbeans/modules/mercurial/util/HgCommand.java (-1 / +8 lines)
Lines 231-236 public class HgCommand { Link Here
231
    private static final String HG_CANNOT_RUN_ERR = "Cannot run program"; // NOI18N
231
    private static final String HG_CANNOT_RUN_ERR = "Cannot run program"; // NOI18N
232
    private static final String HG_ABORT_ERR = "abort: "; // NOI18N
232
    private static final String HG_ABORT_ERR = "abort: "; // NOI18N
233
    private static final String HG_ABORT_PUSH_ERR = "abort: push creates new remote branches!"; // NOI18N
233
    private static final String HG_ABORT_PUSH_ERR = "abort: push creates new remote branches!"; // NOI18N
234
    private static final String HG_ABORT_NO_FILES_TO_COPY_ERR = "abort: no files to copy"; // NOI18N
234
    
235
    
235
    private static final String HG_NO_CHANGE_NEEDED_ERR = "no change needed"; // NOI18N
236
    private static final String HG_NO_CHANGE_NEEDED_ERR = "no change needed"; // NOI18N
236
    private static final String HG_NO_ROLLBACK_ERR = "no rollback information available"; // NOI18N
237
    private static final String HG_NO_ROLLBACK_ERR = "no rollback information available"; // NOI18N
Lines 1281-1287 public class HgCommand { Link Here
1281
        List<String> list = exec(command);
1282
        List<String> list = exec(command);
1282
        if (!list.isEmpty() &&
1283
        if (!list.isEmpty() &&
1283
             isErrorAbort(list.get(list.size() -1))) {
1284
             isErrorAbort(list.get(list.size() -1))) {
1284
            handleError(command, list, NbBundle.getMessage(HgCommand.class, "MSG_RENAME_FAILED"));
1285
            if (!bAfter || !isErrorAbortNoFilesToCopy(list.get(list.size() -1))) {
1286
                handleError(command, list, NbBundle.getMessage(HgCommand.class, "MSG_RENAME_FAILED"));
1287
            }
1285
        }
1288
        }
1286
    }
1289
    }
1287
    
1290
    
Lines 2382-2387 public class HgCommand { Link Here
2382
        return msg.indexOf(HG_ABORT_PUSH_ERR) > -1; // NOI18N
2385
        return msg.indexOf(HG_ABORT_PUSH_ERR) > -1; // NOI18N
2383
    }
2386
    }
2384
2387
2388
    public static boolean isErrorAbortNoFilesToCopy(String msg) {
2389
        return msg.indexOf(HG_ABORT_NO_FILES_TO_COPY_ERR) > -1; // NOI18N
2390
    }
2391
2385
    private static boolean isErrorNoChangeNeeded(String msg) {
2392
    private static boolean isErrorNoChangeNeeded(String msg) {
2386
        return msg.indexOf(HG_NO_CHANGE_NEEDED_ERR) > -1;    // NOI18N
2393
        return msg.indexOf(HG_NO_CHANGE_NEEDED_ERR) > -1;    // NOI18N
2387
    }
2394
    }

Return to bug 126062