Purpose of the largefiles extension?
Benjamin Pollack
benjamin at bitquabit.com
Thu Oct 20 19:03:52 UTC 2011
On Oct 20, 2011, at 2:44 PM, Tom Anderson wrote:
> Is there any way to say "pull down all the largefiles i might need to
> update to any changeset in $REVSET"?
There isn't in the version that's currently in Mercurial, but I'm working on a patch to add that capability right now, and hope to submit it later today or first thing tomorrow.
If you wanted to download all largefiles right this second, you could write a quick script to update to every revision between 0 and tip, but I'm not going to suggest with a straight face that that's the right way to do things.
> How does the cache get purged?
Manually. Neither Mercurial nor largefiles knows whether any given repository is the canonical one, so it never knows whether it's safe to clear out the per-repository store. Pending my last patchbomb being accepted, it's *always* safe to delete the user cache, however. It'd be a simple "rm -r ~/.largefiles".
>
> What is the actual mechanism for downloading the largefiles? HTTP, or
> part of the Mercurial wire protocol, or what?
It works over the local file system, HTTP, HTTPS, and SSH. You can see the implementations for these various transfer mechanisms in localstore.py, wireproto.py, proto.py, and remotestore.py. Adding new mechanisms is as simple as subclassing basestore and extending the mapping at basestore._storeprovider.
>
> Is there any fallback to a degraded mode if you update to a revision
> which needs a largefile you don't have, and you can't reach the
> server? Can you check out the placeholder file instead?
You can still update to the revision; the missing largefile shows up as missing, just as if you had run "rm <thefile>" and not told Mercurial what to do about it. You'd then need to do a selective "hg commit" to make changes.
--Benjamin
More information about the Mercurial
mailing list