"unshelve" deleted last committed revision?

Braden McDaniel braden at endoframe.com
Mon Aug 18 16:50:45 UTC 2014


It looks very much like an "unshelve" operation has deleted my most 
recent revision.  It was a big revision, so I'm really hoping someone 
can help me recover it.

I committed my changes:

   $ hg ci -m "Remove Windows precompiled header machinery"

I then proceeded to unshelve some bits to inspect them:

   $ hg unshelve
   unshelving change 'default-01'
   rebasing shelved changes
   merging src/NwIndex/ManagedIndexPage.cpp
   merging src/NwIndex/MetaIndexEngine.cpp
   merging src/NwIndex/Test.cpp
   src/NwAppliance/stdafx.cpp: no such file in rev 4db819c26642
   src/NwAppliance/stdafx.h: no such file in rev 4db819c26642
   [snip many more messages like the above]

Things looked fine; but I didn't care about these changes, so I 
reverted them:

   $ hg revert src/NwIndex/ManagedIndexPage.cpp 
src/NwIndex/MetaIndexEngine.cpp src/NwIndex/Test.cpp

The next thing I did was to delete a shelved changeset that I knew I 
didn't want:

   $ hg shelve -d boost-intrusive-update

Things still seemed to be okay at this point.  Next, I unshelved the 
last shelved changeset:

   $ hg unshelve
   unshelving change 'default'
   rebasing shelved changes
   merging src/CMake/DownloadDeps.cmake
   warning: conflicts during merge.
   merging src/CMake/DownloadDeps.cmake incomplete! (edit conflicts, 
then use 'hg resolve --mark')
   unresolved conflicts (see 'hg resolve', then 'hg unshelve 
--continue')

Again, nothing really out of the ordinary here.  I resolved the 
conflicts and marked the file:

   $ hg resolve -m src/CMake/DownloadDeps.cmake

... and continued the unshelve operation:

   $ hg unshelve --continue
   src/NwAppliance/stdafx.cpp: no such file in rev 31f991ab7856
   src/NwAppliance/stdafx.h: no such file in rev 31f991ab7856

   [snip a bunch more messages like the above]

   no changes needed to src/CMakeLists.txt

   [snip a bunch more messages like the above]

   unshelve of 'default' complete

That operation is where things appear to have gone sideways; because a 
subsequent "hg st" yields this:

   $ hg st
   warning: ignoring unknown working parent 31f991ab7856!

And, disturbingly, "hg log" no longer includes the last thing I 
committed:

   $ hg log | grep machinery
   [no output]

I've tried this (attempting to update to the revision listed in the 
warning message):

   $ hg up 31f991ab7856
   warning: ignoring unknown working parent 31f991ab7856!
   abort: unknown revision '31f991ab7856'!

... And this (attempting to use the revision number from the messages 
after the first unshelve operation):

   $ hg up 4db819c26642
   warning: ignoring unknown working parent 31f991ab7856!
   abort: unknown revision '4db819c26642'!

"hg verify" doesn't seem to complain about anything:

   $ hg verify
   checking changesets
   checking manifests
   crosschecking files in changesets and manifests
   checking files
   2581 files, 3423 changesets, 12221 total revisions

... And "hg summary" looks like this:

   $ hg summary
   warning: ignoring unknown working parent 31f991ab7856!
   parent: -1:000000000000  (no revision checked out)
   branch: default
   commit: 8 unknown (clean)
   update: 3363 new changesets (update)

I've reviewed the RepositoryCorruption wiki page; but the 
recommendations there tend to start with "hg verify" reporting some 
problems; so I'm not sure how to proceed here.  Any suggestions would be 
very much appreciated.

-- 
Braden McDaniel
<braden at endoframe.com>



More information about the Mercurial mailing list