I have a bunch of local changes to contrib/hexeditor which Mercurial does not yet know about. My log is filled with stack traces such as the ones below.
Given that this problem will occur any time there is a new file that Mercurial does not know about, it really does not make sense to log a stack trace for
each one. Those of us working on our own modules with their own logging find it a lot of noise to dig through.
Also, I would suggest not using exceptions as the mechanism for reporting this situation - creating exceptions is expensive and has an impact on
performance. Since this is a perfectly normal situation, and in a normal session with a bunch of new files, thousands of such exceptions can easily be
thrown, it is very likely to hurt performance.
java.io.IOException: Unable to get BASE revision of /Users/tim/nbsrc/contrib/hexeditor/nbproject/project.xml
[catch] at org.netbeans.modules.mercurial.Mercurial.getOriginalFile(Mercurial.java:323)
We are doing essestially the same as the Subversion module here.
Transferring to versioning for further evaluation.
You have to evaluate the error state in MercurialVCS.getOriginalFile() and only log exceptions that really signal some
exceptional situation. The fact that you won't get a BASE version of a NEW file is certainly not exceptional and you
should not log any error in such case. DiffSidebar does not know about status of your files. I think that check for
STATUS_DIFFABLE fails in Hg for some reason.
That the check for STATUS_DIFFABLE fails would explain why we would get an exception.
However, I have not been able to reproduce this problem this morning. When I create a new file its status in
getOriginalFile is LocallyNew and the exception does not occur.
Do you have a reproducible test case for this?
I have just seen the problem happen.
Created attachment 58577 [details]
Patch committed in changeset 73978:cb2d91802f02.
*** Issue 128402 has been marked as a duplicate of this issue. ***