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

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

Re: [Gnu-arch-users] Re: {arch} directory


From: Tom Lord
Subject: Re: [Gnu-arch-users] Re: {arch} directory
Date: Thu, 25 Sep 2003 13:55:37 -0700 (PDT)

    > From: Robert Collins <address@hidden>

    > On Fri, 2003-09-26 at 02:36, Tom Lord wrote:

    > > Just to be clear:  you expect this hook to actually produce the tree
    > > rather than simply ensuring that the tree is available in a revision
    > > library or pristine tree?

    > Yes, it seemed simpler. Initially, my trivial hook is simply going to
    > call add-pristine, or library add (depend on my preference for that
    > project).

    > > The obvious danger there is that if your hook gets it wrong,
    > > everything is hosed.

    > ;).

    > > What do you actually want this hook to do, besides provide the tree?

    > * Delete old read-only trees it 'decides' are not needed anymore. (I.e.
    > more than 50 revisions back in the patch-list).
    > * Signal success or failure back to tla, so that if it doesn't succeed,
    > things don't get hosed.


Ah.. well, in that case:   it's both easier and a little less error
prone to just have your hook add a pristine or rev lib entry -- and
then let tla go looking for it.

The possibilities that make sense to me are:

        a) call your hook whenever tla needs a read-only tree,
           regardless of whether or not its already there or 
           not.

        b) call your hook only after the read-only tree isn't found,
           but then double-check after your hook returns.

(a) has the advantage that your hook gets some feedback by which it
can measure "demand" for a given tree.


(b) has the advantage that your hook knows for sure, when its called, 
that the tree isn't already hanging around as a pristine or revlib
entry.

Pick one.

And, with either, should the exit status of the hook be significant?
Why or why not?

-t





reply via email to

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