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.
try {
int status = hg.getFileStatusCache().getStatus(srcFile).getStatus();
if ((status == FileInformation.STATUS_NOTVERSIONED_NEWLOCALLY ||
if (status == FileInformation.STATUS_NOTVERSIONED_NEWLOCALLY) {
status == FileInformation.STATUS_VERSIONED_ADDEDLOCALLY)) {
srcFile.renameTo(dstFile);
} else if (status == FileInformation.STATUS_VERSIONED_ADDEDLOCALLY) {
HgCommand.doRemove(root, srcFile);
HgCommand.doAdd(root, dstFile);
} else {
HgCommand.doRename(root, srcFile, dstFile);
}