是否可以在不创建本地存储库的情况下从 Mercurial 获取最新的文件集?
我正在开发一个执行持续集成的系统,并且正在寻找一种可以用来从 Mercurial 存储库获取最新变更集的方法,而无需在本地创建存储库。
我已经考虑过使用 clone
但此方法仅在您在本地设置工作目录时才有效(因为这将发生在构建服务器上,我不希望这样做,因为包含 < code>.hg 文件和差异 - 我想要的本质上只是从提示修订中导出文件,仅此而已。)
这个请求甚至可能不可能,而且很可能我只是不明白DVCS 非常好。但是,如果我不能做我想做的事,有解决方法吗?
I am working on a system that performs continuous integration and I am looking for a method I can use to get the most recent changeset from a Mercurial repository without creating a repository locally.
I have considered using clone
but this method will only work if you have set a working directory locally (since this will be occurring on a build server, I would prefer not to do this because of inclusion of the .hg
file and the diffs - all I want is essentially an export of the files from the tip revision and nothing more.)
This request may not even be possible, and it's very likely that I just do not understand DVCS very well. However, if I cannot do what I want to do, is there a workaround?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
可以使用“hg archive”,具体取决于远程存储库的设置方式。
如果它可以通过 HTTP 使用
hgweb.cgi
或hgserve
获得,您可以通过编程方式点击存档链接来获取您想要的文件。示例:或者可以通过 ssh 访问:
It's possible using 'hg archive' depending how your remote repository is set up.
If it's available over HTTP using
hgweb.cgi
orhg serve
you can hit the archive link programmatically to get the files you want. Example:or it's available over ssh:
您可以使用:
从 Mercurial 的帮助文件中:
You can use:
From Mercurial's help files:
您可以使用:
检索存储库中的文件列表或
获取特定文件。
You can use:
to retrieve a list of files in the repository or
to get a specific file.