当我剥离一个Mercurial存储库的一个版本并尝试与另一个版本进行同步时,会发生什么? [英] What happens when I strip one version of a mercurial repository and try to synchronize with another one?

查看:142
本文介绍了当我剥离一个Mercurial存储库的一个版本并尝试与另一个版本进行同步时,会发生什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道当我这样做时发生了什么事.同步显然是成功的,因为没有生成警告,但是当我克隆远程存储库时,我发现同步根本没有发生.我正在使用bitbucket作为远程存储库.

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?

推荐答案

当您从存储库中strip变更集时,它仅影响您的本地存储库.对其他人没有影响.

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

如果从本地存储库剥离的变更集存在于远程存储库中,那么下次您从该远程仓库pull进行剥离时,剥离的更改集将被视为任何其他传入修订.它将被从远程拉到您的本地.

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.

此行为对于修改回购记录的任何操作都是正确的.这就是为什么通常不鼓励人们在已推送到公共"位置的任何变更集上运行striprebasemq命令的原因.

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.

这篇关于当我剥离一个Mercurial存储库的一个版本并尝试与另一个版本进行同步时,会发生什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆