What happens when I strip one version of a mercurial repository and try to synchronize with another one?

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

Question

I know what happened to me when I did it. The synchronization was apparently successful, because no warnings were generated, but when I cloned the remote repository I saw that the synchronization didn't happen at all. I was using bitbucket as the remote repository.

But I don't think this is what is supposed to happen. What is then?

Was it helpful?

Solution

When you strip a changeset from a repo, it only affects your local repository. It has no effect on others.

If the changeset you stripped from the local repo exists in a remote repo, then the next time you pull from that remote, the stripped changeset will be treated like any other incoming revision. It will be pulled from the remote to your local.

This behavior is true of any operation which modifies the history of a repo. This is why people are generally discouraged from running strip, rebase or mq commands on any changeset which has been pushed to a "public" location.

It is not clear from your question if "synchronize" means that you pushed, pulled or both. However, the behavior I described above is expected.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top