Hi Guido,

I've checked this one out. Seems to be a consequence of the hg developers decision to only ever append to a "revlog" (hg's basic storage unit) and some other design decisions, Makes the storage quite stable I assume at the cost of space inefficiency. A pity I think.

Heiner

Guido Ostkamp wrote:
Hi Heiner,

Developers, please: if you make big changes like this, use "svn move" or it's equivalent to move the files, regardless if it's in SVN or later in a DSCM. We don't want to have hundred's of megabytes dead weights in a repository which every one needs to copy/clone many times.A

I regret to say this, but even if you use 'move' Mercurial does handle this rather inefficient as you still get an additional full copy of the latest version.

E.g.

$ hg init
$ cp /boot/vmlinuz .
$ hg add vmlinuz
$ hg commit -m "checkin 1"
$ du -s .
3120    .
$ hg mv vmlinuz vmlinuz.new
$ hg commit -m "checkin 2"
$ du -s .
4644    .
$ hg mv vmlinuz.new vmlinuz.newer
$ hg commit -m "checkin 3"
$ du -s .
6168    .

Obviously a lot of space is wasted with each 'move' although in the end you only have one file in your working tree. In theory only a few bytes would be needed to store a hint where the file came from earlier and then access that already existing store for further history.

Git handles this much more efficiently:

$ git init
$ cp /boot/vmlinuz .
$ git add vmlinuz
$ git commit -m "checkin 1"
$ du -s .
3172    .
$ git mv vmlinuz vmlinuz.new
$ git commit -m "checkin 2"
$ du -s .
3180    .
$ git mv vmlinuz.new vmlinuz.newer
$ git commit -m "checkin 3"
$ du -s .
3188    .

This is how it should work.

Maybe the OpenOffice.org project has enough influence to persuade the Mercurial developers to implement an improvement?

Regards

Guido

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tools.openoffice.org
For additional commands, e-mail: dev-h...@tools.openoffice.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tools.openoffice.org
For additional commands, e-mail: dev-h...@tools.openoffice.org

Reply via email to