3r1co / hg4j

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

Status fails when dirstate lists unknown parent #36

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
org.tmatesoft.hg.repo.HgInvalidRevisionException: Can't find revision
58d1c0570390 in org.tmatesoft.hg.repo.HgChangelog@bd218d (58d1c0570390)
at org.tmatesoft.hg.repo.Revlog.getRevisionIndex(Revlog.java:150)
at
org.tmatesoft.hg.repo.HgWorkingCopyStatusCollector.initDirstateParentManifest(Hg
WorkingCopyStatusCollector.java:150)
at
org.tmatesoft.hg.repo.HgWorkingCopyStatusCollector.walk(HgWorkingCopyStatusColle
ctor.java:184)

However, Mercurial, if there's a repository with bad parent revision in 
dirstate, is still able to proceed, with a warning:

$hg status
warning: ignoring unknown working parent 58d1c0570390!
M ...

It seems it dumps dirstate state for Added, Removed and Merged, and reports 
rest (Normal files) as Modified.

I don't see value in such a status, so ignoring bad parent doesn't seem to be 
an option. Instead, this might be a good item to check in a dedicated 
'verify/validate/check' operation

Original issue reported on code.google.com by tikhomir...@gmail.com on 18 Oct 2012 at 5:22