我可以在不进行完整克隆的情况下获得 Mercurial 存储库的提示快照吗?
假设我在另一台机器上有一个存储库,其整个历史记录太大而无法在本地克隆。如果我无意将任何更改提交回该存储库,那么我没有理由不能只拍摄提示的快照。有没有办法做到这一点,或者我是否会发现自己通过 rsync hack 或类似的东西来解决这个问题?
如果有帮助的话,就我而言,远程存储库是由 Mercurial-server 通过 ssh 隧道提供的。
Say I have a repository on another machine whose entire history is to big to clone locally. If I have no intention of submitting any changes back to that repository, there's no reason that I shouldn't be able to just take a snapshot of the tip. Is there a way to do this, or am I going to find myself working around this with an rsync hack or something similar?
If it helps, in my case, the remote repository is provided by mercurial-server through an ssh tunnel.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Mercurial 的标准 CGI 脚本允许您下载任何修订版的 zip 和 tarball。请参阅
web.allow_archive
设置。您还可以使用hgserve
来查看这一点,它运行与下面的 CGI 脚本相同的代码。The standard CGI script for Mercurial lets you download zip and tarballs for any revision. See the
web.allow_archive
setting. You can also see this withhg serve
, which runs the same code as the CGI script underneath.您可以使用
hg archive
为任何修订创建未版本化的存档。它不适用于 ssh URL,因此您必须在远程主机上运行它,然后 scp 归档文件。You can use
hg archive
to create an unversioned archive for any revision. It does not work with ssh URL, so you'd have to run it on the remote host then scp the archive back.