Mercurial:要从修订版本获取更改的文件吗? [英] Mercurial: Getting changed files from revision?

查看:80
本文介绍了Mercurial:要从修订版本获取更改的文件吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法理解如何仅获取上次修订中更改的文件,而不能获取通过使用Clone获得的完整回购.例如,这对于部署上次更改的文件将非常有帮助.

I can't get my head around how I can get only the files that were changed in my last revision, and not the complete repo, which i get by using Clone. This would be super helpful to for instance, deploy the last changed files.

我该怎么办?

谢谢

推荐答案

Martin有正确的方法来获取修订中哪些文件已更改的列表,我赞成他的回答,但只是为了扩展您的原因.问题有点离题:

Martin has the right way to get a list of what files have changed in a revision, and I've upvoted his answer, but just to expand on why your question is a little off:

在Mercurial中,每个位置都有完整的副本,其中包含所有更改.如果要使用Mercurial部署到服务器,则必须将所有内容克隆到服务器-一次.之后,推/拉操作将仅移至服务器尚不具备的(压缩)变更集.

In Mercurial every location has a full copy with all changes. If you're going to use Mercurial to deploy to your server then you have to clone everything to your server -- once. After that push/pull will move over only the (compressed) changesets that the server doesn't already have.

如果您不希望拥有服务器上曾经拥有的所有内容,那么您需要使用非商业用途的内容进行部署,也许是由Martin显示的状态命令提供的内容或从hg archive创建的快照提供的内容.

If you don't want to have everything that ever was on the server, then you need to use something other than mercurial for your deployment, perhaps something fed from the status commands Martin showed or a snapshot created from hg archive.

就我个人而言,我可以在服务器上拥有完整的历史记录,并且只需对每个新部署在服务器上执行hg pull ; hg update即可.整洁高效.

Personally, I'm okay with having full history on my servers, and just do a hg pull ; hg update on the server for each new deployment. It's tidy and efficient.

这篇关于Mercurial:要从修订版本获取更改的文件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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