从存储库部署更改的文件?
我最近测试了 Mercurial 和 SVN,我爱上了 Mercurial 来解决我的版本控制需求。但是,我的存储库中有文件,我在本地处理这些文件并每天提交更改。
我还没有找到任何方法将文件从本地测试环境部署到远程生产环境。
我该如何做到这一点并通过“一键式”替换和/或更新已从 Mercurial 存储库更改的文件?
我可以通过 FTP 访问我的生产环境,如果这有什么区别的话。
谢谢
I have tested both mercurial and SVN recently, and I fell for Mercurial to solve my version control needs. However, I have files in my repo, that I work on locally and commit my changes to daily.
I have yet not found any way to deploy files to a remote production environment from my local testing environment.
How can I do this and by "one click only" replace and/or update the files that have been changed from a mercurial repo?
I have FTP access to my production environment and, if that makes any difference.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以使用
rsync
复制工作目录中的更改。您可以使用
hg diff
生成补丁,或使用hg diff -r
从特定修订版生成补丁,然后应用更改您可以将远程端设置为 hg 存储库,然后推送到它并更新它。
您可以使用
quilt
或hg mq
保留本地更改并迁移这些补丁。您可以仅复制整个工作目录并进行替换。
You can use
rsync
to copy over the changes from your working directory.You can use
hg diff
to generate a patch, orhg diff -r <rev>
to generate a patch from a particular revision, and then apply the change remotely.You could make the remote end an hg repo and then push to it and update it.
You could keep your local changes with
quilt
orhg mq
and migrate those patches.You could just copy over the whole working directory, with replacement.
为什么不克隆代码呢?在您的开发位置使用
hg clone my-source-repo
您可以获得代码的更新状态。Why not clone the code? using
hg clone my-source-repo
in your development location you get an updated state of your code.当您不需要只需要工作副本而不需要存储库时,可以使用
hg archive
提取已提交的文件。When you don't need only the working copy without the repository, you can extract the committed files with
hg archive
.