设置从 UAT 到 PROD 的 Mercurial 推送
我们现在有一个运行 Mercurial 的系统,它允许我们将代码从 DEV 推送到 UAT...我需要添加从 UAT 推送到 PROD 的功能。我不习惯 Mercurial,据我了解,为了能够推送到目录,您需要从原始目录克隆当前目录。这是正确的还是有办法让我设置 UAT 推送到 PROD,而不擦除 UAT 并基于 PROD 克隆创建新的 UAT?
我希望这是一个清晰的解释,我想不出更好的解释方法。
We have a system right now that runs Mercurial which allows us to push code from DEV to UAT... I need to add the ability to push from UAT to PROD. I'm not used to Mercurial and from what I understand in order to have the ability to push to a directory you need to have cloned your current directory from that original. Is that correct or is there a way for me to setup UAT to push to PROD without erasing UAT and creating a new UAT based off of a clone of PROD??
I hope that was a clear explanation, I can't think of a way to explain it better.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以编辑
.hg/hgrc
文件中的[paths]
部分以指向所需的任何相关存储库。通过相关,我的意思是指向的存储库已从另一个存储库克隆(实际上,您可以指向任何存储库,但如果它们不相关,您将在推送时收到错误)。如果您从 A 克隆 B,B 将已有一个指向 A 的default
路径。在您的情况下,请编辑 UAT 存储库中的
.hg/hgrc
以添加行例如:请参阅
hg 帮助路径
或 http://www.selenic.com/mercurial/hgrc.5.html#paths 了解更多信息。You can edit
[paths]
section in the.hg/hgrc
file to point to any related repository that you want. By related, I mean that the pointed-to repository has been cloned from the other (actually, you can point to any repository, but if they're not related you'll get errors on the push). If you clone B from A, B will already have adefault
path that points to A.In your case, edit the
.hg/hgrc
in the UAT repo to add lines like:See
hg help paths
or http://www.selenic.com/mercurial/hgrc.5.html#paths for more information.