largefiles: understanding .hg/largefiles directory vs 'usercache'

John W jwdevel at gmail.com
Thu Mar 2 19:30:22 UTC 2023


It is not clear to me when it might be safe to delete files from
".hg/largefiles/..." vs the "usercache" directory[1]

I have a situation where various "leftover" files remain in the
.hg/largefiles directory, taking up space. They are not needed by the
currently-updated revision. But why does Mercurial keep them around,
then?

My understanding was that the "real" copies of the files are kept in
the usercache directory.

Is there a good way to "clean up" the .hg/largefiles dir, so that it
only contains the files it currently needs?

For the usercache dir, I think it is sufficient to simply delete it
and re-update. But for the .hg/largefiles dir, it is not documented,
and it is inside the private .hg directory, so I assume it is
"implementation details" that I should not be messing with maually, as
a general rule.

[1] Default is ~/.cache/largefiles, but can be configured with
largefiles.usercache=... However that config value is only documented
in the wiki, not the built-in help.

Thanks
-John


More information about the Mercurial mailing list