gnu-arch-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnu-arch-users] hardlinked pristine trees


From: Bruce Stephens
Subject: Re: [Gnu-arch-users] hardlinked pristine trees
Date: Fri, 03 Oct 2003 17:38:48 +0100
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux)

Andrea Arcangeli <address@hidden> writes:

> On Fri, Oct 03, 2003 at 01:52:11PM +0100, Bruce Stephens wrote:
>> Pau Aliagas <address@hidden> writes:
>> 
>> [...]
>> 
>> > But (and that's a big but), I don't see any danger in hardlinking
>> > pristine trees. The danger is the same than if you corrupt a local
>> > pristine, be it hardlinked or not, but the benefits are obvious:
>> > space saving, full speed gets, etc. Pristine trees are neeed, for
>> > instance, to compute what-changed.
>> 
>> [...]
>> 
>> > Does anybody have an opinion about it?
>> 
>> Much better to have sparse revision libraries, and do away with
>> pristine trees altogether, IMHO.
>
> Do I understand correctly the pristine tree is a temporary thing needed
> just to diff against it?

I don't think it's temporary.  You get one (unless you say otherwise
with the relatively new --no-pristine flag) whenever you get a working
tree, and it lives in the {arch} directory (so if you've got ten
working trees for the same revision, then you'll have (by default) 10
pristine trees).  It gets updated when you do replay, update, commit
so it corresponds with whatever the working tree corresponds to.  

If you try doing a diff (using what-changed, for example) against a
revision for which there's no revision library, and no pristine tree,
then I think you get an error message saying that you don't have an
appropriate pristine tree, but I don't think arch will create one
automatically.

> I want only 1 revision lib. the revision lib is the cache, the
> pristine tree is not. I don't want more than 1 copy unpacked, and I
> don't need any cacherev. With just 1 revlib fairly near the head, I
> can diff against all previous revisions very efficiently by creating
> temporary pristine trees with hardlinks. Then those pristine trees
> can be deleted after the diff has been generated.

That's true, and if the pristine trees used hard links, then removing
the last copy would automatically free the disk space, which would be
neat.

> If the pristine tree is not temporary then I don't see the
> difference between revlibs and pristine trees.

That's the point, I think.  There is a difference, which is that until
Pau did the work on making revision libraries sparse, revision
libraries had to contain all revisions, whereas pristine trees only
need to contain one (occasionally more than one, but not that often).

But (once Tom takes Pau's changes) revision libraries are close to
becoming a practical alternative to pristine trees.  The only catch is
that we'll probably need some way to automatically do library-add when
a desired revision isn't there, and many people will want some means
of automatically trimming the revision library to remove unused
revisions.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]