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

(-)a/mercurial/src/org/netbeans/modules/mercurial/Mercurial.java (-3 / +6 lines)
Lines 324-336 public class Mercurial { Link Here
324
324
325
    public void getOriginalFile(File workingCopy, File originalFile) {
325
    public void getOriginalFile(File workingCopy, File originalFile) {
326
        FileInformation info = fileStatusCache.getStatus(workingCopy);
326
        FileInformation info = fileStatusCache.getStatus(workingCopy);
327
        LOG.log(Level.FINE, "getOriginalFile: {0} {1}", new Object[] {workingCopy, info}); // NOI18N
327
        if ((info.getStatus() & STATUS_DIFFABLE) == 0) return;
328
        if ((info.getStatus() & STATUS_DIFFABLE) == 0) return;
329
330
        // We can get status returned as UptoDate instead of LocallyNew
331
        // because refreshing of status after creation has been scheduled
332
        // but may not have happened yet.
328
333
329
        try {
334
        try {
330
            File original = VersionsCache.getInstance().getFileRevision(workingCopy, Setup.REVISION_BASE);
335
            File original = VersionsCache.getInstance().getFileRevision(workingCopy, Setup.REVISION_BASE);
331
            if (original == null) {
336
            if (original == null) return;
332
                throw new IOException("Unable to get BASE revision of " + workingCopy);
333
            }
334
            org.netbeans.modules.versioning.util.Utils.copyStreamsCloseAll(new FileOutputStream(originalFile), new FileInputStream(original));
337
            org.netbeans.modules.versioning.util.Utils.copyStreamsCloseAll(new FileOutputStream(originalFile), new FileInputStream(original));
335
            original.delete();
338
            original.delete();
336
        } catch (IOException e) {
339
        } catch (IOException e) {

Return to bug 129980