"unshelve" deleted last committed revision?
Augie Fackler
raf at durin42.com
Tue Aug 19 14:20:52 UTC 2014
On Mon, Aug 18, 2014 at 12:50:45PM -0400, Braden McDaniel wrote:
> 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
>
Interesting. Sounds like a shelve bug. Does 'hg log --hidden' show
anything of potential interest?
> 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.
There should be backups in .hg/strip-backup - if you run 'hg incoming'
on those files, one of them (or more) should contain 31f991ab7856 and
you should be able to 'hg pull' it and get your work back.
Also, it's worth filing the bug about the dataloss bug in shelve (I
think that's what's going on here?) over in http://bz.selenic.com for
tracking.
>
> --
> Braden McDaniel
> <braden at endoframe.com>
> _______________________________________________
> Mercurial mailing list
> Mercurial at selenic.com
> http://selenic.com/mailman/listinfo/mercurial
More information about the Mercurial
mailing list