我们有一个大型的旧仓库,其中包含largefiles。我想使用运行hg pull的cron脚本将存储库复制到备份服务器。但是,此命令不会检索大文件。

我目前有2GB的历史记录被复制,但是我缺少6GB的大文件。我怎样才能让Hg提取那些重要文件?

最佳答案

默认情况下,将仅下载要更新到的修订版本的大文件。

“ hg help largefiles”说:

When you pull a changeset that affects largefiles from a remote repository,
the largefiles for the changeset will by default not be pulled down. However,
when you update to such a revision, any largefiles needed by that revision are
downloaded and cached (if they have never been downloaded before). One way to
pull largefiles when pulling is thus to use --update, which will update your
working copy to the latest pulled revision (and thereby downloading any new
largefiles).

If you want to pull largefiles you don't need for update yet, then you can use
pull with the "--lfrev" option or the "hg lfpull" command.


为此,您应该可以使用'hg lfpull --rev“ all()”'。

08-27 20:44