[RFC] largefiles - "system-wide" cache

Eric Roshan Eisner ede at alum.mit.edu
Tue Oct 18 20:48:00 CDT 2011


Additionally, if you clone a project that has many big largefiles, then nuke
that project, those largefiles hang around in the global store forever. I
don't see a mechanism to get rid of unused files in the store.

However, if all of the global files are hardlinked to (at least) one file in
a repo's .hg/largefiles, files in the global store can be safely garbage
collected if they have only one link.

-Eric

On Tue, Oct 18, 2011 at 13:38, Carter, Eli <Eli.Carter at tektronix.com> wrote:

> All,
>
> The largefiles extension talks a lot about a system-wide cache.  There are
> two problems with this.  First, this cache is per-user, not a system-wide.
>  And secondly, it is more accurately described as a 'store' than as a
> 'cache'.
>
> Regarding 'system-wide' vs 'per-user':
> The extension assumes files are in the system cache, but if one user is
> cloning a repository from another user on the same machine, those files
> _won't_ be in the "system-wide" cache, and the clone winds up without the
> largefiles (and spews "Can't get file locally" errors).
>
> Recarding 'cache' vs 'store':
> Clearing your largefile 'cache' may cause data loss.   If you 'push' your
> changes to another repository, you should be ok, but if you 'clone' or
> 'pull', you won't get all the versions of the largefiles.  A user who wants
> to clean up a messy repository by cloning, deleting the original, and
> clearing ~/.largefiles winds up with a mess.  Further, if a repository is
> restored from backup onto a new machine, the ~/.largefile 'cache' may not
> exist.
> Additionally, this breaks the existing symmetry between 'push' and 'pull'.
>  (And for good reason: we're trying to avoid having a full copy of all of
> those largefiles on every client.)  But we need a way to say 'no, really, I
> want a full clone'.
>
>
> Therefore, there are two things I'd like to see:
>
> 1: I'd like to have the extension populate $repo/.hg/largefiles in addition
> to ~/.largefiles (using hardlinks where possible), and reference it when
> looking for files.
> 2: I'd like to have an --all-largefiles option for hg clone and hg pull
> that downloads all versions of all largefiles referenced by any changeset
> included in the transfer.
>
> Would these changes be welcome, or are there objections to these changes at
> this conceptual level?
>
> Eli
>
>
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20111018/cbde6729/attachment.html>


More information about the Mercurial-devel mailing list