Mon 08 Sep 2003 11:23:07 PM UTC, original submission:
Currently, the tla library-add subcommand recursively adds all preceding
revisions (until it hits a previously added library revision),
presumably depending on hard-link sharing of files to avoid excessive
disk-space consumption.
However in my experience, this doesn't work all that well in practice -- it
does end up using large amounts of excessive disk-space for the preceding
revisions, and I've had to get into the habit of going back and manually
removing all the `extra' revisions it adds to get the space back.
For instance, with the sources for tla itself, which are fairly small:
. Size of tla sources: 4.8MB
. I had a previous library lord@emf.net--2003b/tla--devo--1.1--patch-127,
and I did `tla library-add lord@emf.net--2003b/tla--devo--1.1--patch-153'.
tla automatically added all the intervening revisions, for a total of 27
revisions added.
. The resulting increase in disk-space usage was 39.6MB, or about 1.5MB per
revision added -- efficient per revision, but since a version can have
hundreds of revisions, it adds up pretty quickly, especially for large
source trees.
. Removing all the intervening automatically-added revisions reclaimed about
36MB, so the single revision I actually wanted took up 3.7MB (a bit
smaller than the actual sources, presumably because it's sharing some
space with the other revisions I added earlier).
Anyway, I think that library-add should add just the requested revision,
finding any previously added library revision, hard-link copying that tree,
and then updating the copy in-place until the desired revision is reached.
I think this is a also reasonable from a `least surprise' point of view too
-- it does exactly what the user requests, and uses resources accordingly.
If the `add all intervening revisions' behavior is desirable, it could be
requested explicitly, e.g. with an `--until' option.
|