Not a holy war - just some salient facts

TK Soh teekaysoh at gmail.com
Wed Apr 14 23:40:03 UTC 2010


On Wed, Apr 14, 2010 at 7:16 PM, Greg Ward <greg-hg at gerg.ca> wrote:
> On Wed, Apr 14, 2010 at 12:10 PM, Tom Widmer <tom.widmer at googlemail.com> wrote:
>> Because of the filelog format, if you rename every file in a HG repo, you
>> double the repo's size.
>
> That's only true if every tracked file is uncompressible and has
> exactly one revision.  What happens when you rename is that hg copies
> the last revision of the old filelog to the new filelog.  Since it's a
> revision in a filelog, the data is compressed.  And it's only revision
> that gets copied.
>
> It's obviously still suboptimal -- for example, if the first rev of
> the new filelog could reference the rev from which it was copied, it
> could be a delta rather than a compressed copy.  But it's not as bad
> as you say.

I'd say it is very bad for us at work, since we have to deal with a
lot of binary files which don't compress very well (and most of them
are already gzipped to begin with), and a lot of them are quite large.
Renaming these files/directories now really kills the disk space.
Looks like lightweight copy/rename is the only solution. Right now, we
just have to tell ourselves "don't rename!"



More information about the Mercurial mailing list