Lightweight copy

Matt Mackall mpm at selenic.com
Sun May 6 17:25:38 UTC 2007


On Sun, May 06, 2007 at 02:29:03PM +0200, 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.

When you copy a file, a new revlog is created with the new filename
containing a single compressed revision of the file. If the old file
only had one revision, then yes, the size will double. If the old file
had a thousand revisions, it will not.

-- 
Mathematics is the supreme nostalgia of our time.



More information about the Mercurial mailing list