3r1co / hg4j

Automatically exported from code.google.com/p/hg4j
GNU General Public License v2.0
0 stars 1 forks source link

NPE at Revlog.getLocalRevision() #17

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Marc:

java.lang.NullPointerException
at org.tmatesoft.hg.repo.Revlog.getLocalRevision(Revlog.java:125)
at
org.tmatesoft.hg.repo.HgWorkingCopyStatusCollector.areTheSame(HgWorkingCopyStatu
sCollector.java:390)
at
org.tmatesoft.hg.repo.HgWorkingCopyStatusCollector.checkLocalStatusAgainstFile(H
gWorkingCopyStatusCollector.java:279)
at
org.tmatesoft.hg.repo.HgWorkingCopyStatusCollector.walk(HgWorkingCopyStatusColle
ctor.java:212)

The issue seems odd as the only chance for NPE in Revlog#getLocalRevision is 
local file that doesn't exist. However, areTheSame above in the stacktrace is 
invoked only when file is known as 'Normal' in dirstate (moreover, even 
revision of the file is known from the dirstate parent). 

Added this request to keep track of couple debug changes made to the code to 
nail the issue down (HgWorkingCopyStatusCollector#checkLocalStatusAgainstFile 
got an extra check for file node existence)

Original issue reported on code.google.com by tikhomir...@gmail.com on 15 Nov 2011 at 2:08

GoogleCodeExporter commented 8 years ago
Issue 18 describes the problem more thoroughly.

Original comment by tikhomir...@gmail.com on 22 Nov 2011 at 4:03