Mercurial: Pull changes from remote repository without public phase (non-publishing server, "abort: can't rebase immutable changeset")

StackOverflow https://stackoverflow.com/questions/15510818

質問

Background

Mercurial now has Phases which are a great mechanism to keep people from altering history that should not be altered. When a changeset is pushed to remote repository it is made public and can no longer be rebased. This is normally a good thing, if the repository is public and you don't want others altering your changesets.

However, if you have your own temporary repository for sharing draft changesets only with yourself, it can get very annoying. Mercurial has a option to turn this off. Adding this to the .hg/hgrc file of the remote repository.

[phases]
publish = False 

This will prevent changesets pushed to the remote repository from moving from draft phase to public phase (both the local changeset and the one just pushed to the remote repository. However, pulling this changeset down still will always pulls it down in the public phase.

Question

I am hoping to pull down changesets in the draft phase. I simply want to push a changeset to my personal server then pull it down at home. After I pull it I will rebase my temporary commit on top of any commits that I have pulled down from our true publishing server.

Any way to avoid the auto-moving of a pulled changeset to public would be great. This remote repository is a complete and total draft server for myself. Being forced to manually move the changesets back to draft after an unsuccessful rebase attempt is really starting to wear on the nerves.

References

役に立ちましたか?

解決 2

I got this resolved through help on Bugzilla. Here is a snippet of my final post there (thanks for putting me on the right track djc).

It looks like we can chalk it up to User Error/Bad Test Cases (of course). If there is anyone to blame (besides myself) it could be TortoiseHg. My test cases consisted of stripping commits and from one of the two repositories and then changing the phase of that commit in the other repository and push/pull again. It seems like TortoiseHg would pull in the wrong phase sometimes (possibly a caching issue). I can still reproduce this when I switch my server back and forth between publishing and non-publishing (but not quite as consistently before).

However, doing a command line pull seems to get it working every time. I was using command line to check outgoing/incoming, do the phase changes and such, but possibly never used it for the actual pull.

Sorry to waste everybody's time. I resolved it as invalid, not sure if someone wants to change it to a better category. Let me know if there is anything else you want me to check or expand upon.

I'll edit in any updates, let me know if anyone is still having trouble with this.

他のヒント

That seems like a bug. What version of Mercurial are you using? Have you tried filing a bug at https://bz.mercurial-scm.org ?

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top