Mercurial: hg unshelve throws error of "unknown bundle version 20" - mercurial

I shelved my changes in my branch and then tried to unshelve them. I get this error:
vagrant#mysite:/var/www/mysite/www$ hg unshelve MYSITE-157-contact-info-for-tda-and-td-av-01
abort: /var/www/MYSITE/.hg/shelved/MYSITE-157-contact-info-for-tda-and-td-av-01.hg: unknown bundle version 20
I found posts online with this error in regards to bundles, but not in regards to shelving. What does this error mean and how can I fix it?

Related

Phabricator, Diffusion, Mercurial: "abort: integrity check failed"

My Phabricator stopped pulling new commits a few days ago, I tried to look at my repository in Diffusion, but an error occured:
Command failed with error #255!
COMMAND
hg --config ui.ssh='/var/www/phabricator/bin/ssh-connect' files --print0 --rev ''\''d753179d2d3defe5b6504c0f4d30f1dd9fb72766'\''' -I '.'
STDOUT
(empty)
STDERR
abort: integrity check failed on 00changelog.i:42440!
42440 was the last commit pulled from my repository. Is that a problem with my repo or with Phabricator? I cannot find anything useful.
Yes, it's a problem with your clone of repo. you can use any of described in related topic methods (starting from hg verify locally and remote) and if 42440 is damaged only in your clone get new good clone
JFYI: https://www.mercurial-scm.org/wiki/RepositoryCorruption

Unknown parent error in Mercurial but no error in verify

We have too large Mercurial repo's in which following error has occured few times during a year when trying to clone:
$ hg clone --rev develop --noupdate http://url.to.repository
adding changesets
adding manifests
adding file changes
transaction abort!
rollback completed
abort: data/.../Result.Database.nuspec.i#03b180f4076b: unknown parent!
All goes well if I don't specify a revision in clone command.
Hg verify doesn't show any error:
$ hg verify
checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
3427 files, 913 changesets, 5406 total revisions
How can I fix this error?
What is causing this error? I would like to fix the root cause to prevent this happening anymore in future.

hg unshelve: abort: working directory parents do not match unshelve state

I recently tried unshelving a change on Mercurial, and an unshelving rebase conflict occurred, which I ended up resolving. Something went wrong after that, because now when I try to do anything else, I get the following error:
abort: unshelve already in progress
(use 'hg unshelve --continue' or 'hg unshelve --abort')
And when I try to use either of those two options, I get the following:
abort: working directory parents do not match unshelve state
How can I restore my working directory to a usable state?
I deleted .hg/shelvedstate and that fixed it for me. You can also move that file instead i.e. mv .hg/shelvedstate .hg/backupshelvedstate if you want to keep the shelvedstate.

How can I overcome the error "unknown parent" when applying a Mercurial bundle.

I bundle changes from one repository, email them to another machine and apply them there to a repository (for a workflow description see this question).
Suddenly I get the following error message (when applying a bundle with a command like hg unbundle -u "bundle_123.hg"):
adding changesets transaction abort!
rollback completed
abort: 00changelog.i#24ecac5680c1: unknown parent!
How can I apply this bundle despite the "unknown parent"? I hoped for a --forceoption, but unbundle doesn't have one...
Or can I avoid this error in an other way?
Short answer: you can't unbundle this bundle, because autonomous changesets are impossible in Mercurial
You don't have parent of 24ecac5680c1 (?) CSET in destination repository (while you must have it) - your bundle is bad and you selected wrong base on bundling

hg pull abort unknown parent

I'm trying to pull from an hg repo but I seem to be getting the following error:
pulling from http://hg.mozilla.org/qa/mozmill-tests
searching for changes
adding changesets
adding manifests
adding file changes
transaction abort!
rollback completed
abort: data/tests/endurance/testBookmarks_AddAndRemoveBookmarkViaAwesomeBar/test1.js.i#2daf2ef33d4b: unknown parent!
And hg verify seems to return
759 files, 2820 changesets, 5082 total revisions
2688 integrity errors encountered!
(first damaged changeset appears to be 54)
How can I fix this?
I've cloned this repo and it worked ok. Do you have any local modifications in your clone? If not, you could just reclone the repo. Otherwise I suggest you to refer to the wiki page about repo corruption.