Need help recovering after mistaken prune
Anton Shestakov
engored at gmail.com
Fri May 3 12:06:35 UTC 2024
чт, 2 мая 2024 г. в 17:46, Ernie Rael <errael at raelity.com>:
>
> Hi All, I screwed up big time,
>
> I was in the wrong directory when I executed
>
> $ hg prune 78
> 1 changesets pruned
> 94 new orphan changesets
>
> I tried "hg touch 78", but attempts to use evolve/rebase wants to do merge resolution and that's not an option. I there any way to patch this up? I wouldn't feel so much panic if this wasn't my home directory.
Hopefully this isn't too late, but if you don't want to use evolve or
rebase, then you can remove the obsmarker by a debug command. Mind
that the hg touch command is indeed the right tool in this situation,
but considering you tried it, seen the result and you deliberately
don't want to use it, I will suggest using a debug command.
The command is hg debugobsolete, it has a --delete flag that you could
use to basically erase any trace of a prune. First you need to know
the obsmarker index, you can do debugobsolete --index --rev 78
--hidden, and then delete the prune obsmarker by giving --delete its
index in the list (you can tell it's a prune marker from the
"operation" metadata item).
More information about the Mercurial
mailing list