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

(-)a/mercurial/src/org/netbeans/modules/mercurial/VersionsCache.java (-7 / +2 lines)
Lines 76-109 public class VersionsCache { Link Here
76
        if(revision.equals("-1")) return null; // NOI18N
76
        if(revision.equals("-1")) return null; // NOI18N
77
        
77
        
78
        File repository = Mercurial.getInstance().getTopmostManagedParent(base);
78
        File repository = Mercurial.getInstance().getTopmostManagedParent(base);
79
        OutputLogger logger = OutputLogger.getLogger(repository.getAbsolutePath());
80
        if (Setup.REVISION_BASE.equals(revision)) {
79
        if (Setup.REVISION_BASE.equals(revision)) {
81
            try {
80
            try {
82
                File tempFile = File.createTempFile("tmp", "-" + base.getName()); //NOI18N
81
                File tempFile = File.createTempFile("tmp", "-" + base.getName()); //NOI18N
83
                HgCommand.doCat(repository, base, tempFile, logger);
82
                HgCommand.doCat(repository, base, tempFile, null);
84
                if (tempFile.length() == 0) return null;
83
                if (tempFile.length() == 0) return null;
85
                return tempFile;
84
                return tempFile;
86
            } catch (HgException e) {
85
            } catch (HgException e) {
87
                IOException ioe = new IOException();
86
                IOException ioe = new IOException();
88
                ioe.initCause(e);
87
                ioe.initCause(e);
89
                throw ioe;
88
                throw ioe;
90
            } finally {
91
                logger.closeLog();
92
            }
89
            }
93
        } else if (Setup.REVISION_CURRENT.equals(revision)) {
90
        } else if (Setup.REVISION_CURRENT.equals(revision)) {
94
            return base;
91
            return base;
95
        } else {
92
        } else {
96
            try {
93
            try {
97
                File tempFile = File.createTempFile("tmp", "-" + base.getName()); //NOI18N
94
                File tempFile = File.createTempFile("tmp", "-" + base.getName()); //NOI18N
98
                HgCommand.doCat(repository, base, tempFile, revision, logger);
95
                HgCommand.doCat(repository, base, tempFile, revision, null);
99
                if (tempFile.length() == 0) return null;
96
                if (tempFile.length() == 0) return null;
100
                return tempFile;
97
                return tempFile;
101
            } catch (HgException e) {
98
            } catch (HgException e) {
102
                IOException ioe = new IOException();
99
                IOException ioe = new IOException();
103
                ioe.initCause(e);
100
                ioe.initCause(e);
104
                throw ioe;
101
                throw ioe;
105
            } finally {
106
                logger.closeLog();
107
            }
102
            }
108
        }
103
        }
109
    }
104
    }
(-)a/mercurial/src/org/netbeans/modules/mercurial/util/HgCommand.java (-1 / +1 lines)
Lines 2717-2723 public class HgCommand { Link Here
2717
    }
2717
    }
2718
2718
2719
    private static void handleError(List<String> command, List<String> list, String message, OutputLogger logger) throws HgException{
2719
    private static void handleError(List<String> command, List<String> list, String message, OutputLogger logger) throws HgException{
2720
        if (command != null && list != null){
2720
        if (command != null && list != null && logger != null){
2721
            Mercurial.LOG.log(Level.WARNING, "command: " + HgUtils.replaceHttpPassword(command)); // NOI18N        
2721
            Mercurial.LOG.log(Level.WARNING, "command: " + HgUtils.replaceHttpPassword(command)); // NOI18N        
2722
            Mercurial.LOG.log(Level.WARNING, "output: " + HgUtils.replaceHttpPassword(list)); // NOI18N
2722
            Mercurial.LOG.log(Level.WARNING, "output: " + HgUtils.replaceHttpPassword(list)); // NOI18N
2723
            logger.outputInRed(NbBundle.getMessage(HgCommand.class, "MSG_COMMAND_ERR")); // NOI18N
2723
            logger.outputInRed(NbBundle.getMessage(HgCommand.class, "MSG_COMMAND_ERR")); // NOI18N

Return to bug 127558