I have a project I cloned over the network to the Mac hard drive (OS X Snow Leopard).
The project is about 1GB in the hard drive
du -s
2073848 .
so when I hg clone proj proj2
then when I
MacBook-Pro ~/development $ du -s proj
2073848 proj
MacBook-Pro ~/development $ du -s proj2
894840 proj2
MacBook-Pro ~/development $ du -s
2397928 .
so the clone seems not so cheap… probably around 400MB… is that so? also, the whole folder grew by about 200MB, which is not the total of proj and proj2 by the way… are there some links and some are not links, that’s why the overlapping is not counted twice?
When possible, Mercurial will use hardlinks on the repository data, it will not use hardlinks on the working directory. Therefore, the only space it can save, is that of the
.hgfolder.If you’re using an editor that can break hardlinks, you can
cp -al REPO REPOCLONEto use hardlinks on the entire directory, including the working directory, but be aware that it has some caveats. Quoting from the manual: