How to use Mercurial's LargeFiles extension?

回眸只為那壹抹淺笑 提交于 2019-12-20 08:48:08

问题


I use Mercurial for game development, and I'm trying to use the LargeFiles extension included in Mercurial 2.0 to keep track of large binary assets. Unfortunately there isn't a whole lot of documentation on the extension, so I'm not sure how people are expected to use it.

For example, is there any way to safely clean out the .hg/largefiles directory? If I'm on the tip revision, and expect to always have internet access, then I don't need the old versions of largefiles cluttering up the repository, since that's the whole point of using the LargeFiles extension.

Also, how do I have more fine-grained control over where the largefile store is? I can only assume that it's created somewhere on the computer that ran hg init, but I have no idea about the details.

Thanks!


回答1:


I don't have any guidance on how to safely clean out the .hg/largefiles directory.

Largefiles Store

The largefiles store seems to be stored, by default, at the one of following locations:

Windows: C:\Users\Username\AppData\Local\largefiles

OSX: /Users/username/Library/Caches/largefiles

Linux: (This is my best guess)

  • /home/username/largefiles
  • or /home/username/.cache/largefiles

User Configured:

This, however, can be changed in the global settings file using the usercache setting as follows:

[largefiles]
usercache = c:\path\to\largefiles\cache\

Note: This is not documented yet. This makes me wonder if it is subject to change.

Sources:

  • Largefiles Extension Documentation
  • User cache paths - https://www.mercurial-scm.org/repo/hg/file/41453d55b481/hgext/largefiles/lfutil.py (lines 84-103)
  • Undocumented largefiles.usercache setting - https://bz.mercurial-scm.org/show_bug.cgi?id=3088



回答2:


I'm just posting this for anyone else coming into the thread from a search.

There's currently an issue using the largefiles extension in the mercurial python module when hosted via IIS. See this post if you're encountering issues pushing large changesets (or large files) to IIS via TortoiseHg.

The problem ultimlately turns out to be a bug in SSL processing introduced in Python 2.7.3 (probably explaining why there are so many unresolve posts of people looking for problems with Mercurial). Rolling back to Python 2.7.2 let me get a little further ahead (blocked at 30Mb pushes instead of 15Mb), but to properly solve the problem I had to install the IISCrypto utility to completely disable transfers over SSLv2.



来源:https://stackoverflow.com/questions/8197880/how-to-use-mercurials-largefiles-extension

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!