Lightweight copy
Daniel Holth
dholth at fastmail.fm
Mon May 7 02:02:43 UTC 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Guido Ostkamp wrote:
>> The most recent revision of the file or all the files in the
>> directory is copied, and it remembers where each file was copied
>> from so that it can merge changes across file renames.
>
> thanks, but this is not what I meant.
>
> I just did some experiments. My repository (after removal of
> working copy) has a size of 442 MB. When I "hg copy dir1 dir2; hg
> commit" where dir1 has everything in it, then (again after removal
> of the working copy) the size of the repository has increased to
> 825 MB.
>
> This certainly means that Mercurial does not use lightweight
> copies.
>
> If I do this in Subversion (SVN), there is nearly no increase in
> size of the repository.
>
> Regards
>
> Guido
Oh well, I should have just said "no, it does not". If you commit ten
completely uncompressable 1-megabyte revisions of a file, and then you
"hg copy" that file, the repository should grow in size by one megabyte.
As I understand it, the justification for this feature is that if
Mercurial did lightweight copies, it would have to do additional disk
seeks to reconstruct the fulltext, the repository would be less robust
against corruption, and the way it currently works is simpler. I tend
to agree with this: disk seeks are expensive!
- - Daniel Holth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGPojDVh4W2pVfoMsRAnahAKC6dXQu9SKBtl+BN5yfjJ7wXxAUZQCgrQPR
bvC9V7CK9i/ihuSot+PV5tg=
=AwSL
-----END PGP SIGNATURE-----
More information about the Mercurial
mailing list