[Top][All Lists]

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

[Gnu-arch-users] tree-lint and explicit ids (was: tla 1.2.2rc1 doesn't a

From: David Allouche
Subject: [Gnu-arch-users] tree-lint and explicit ids (was: tla 1.2.2rc1 doesn't accept {arch}/=partner-versions file)
Date: Thu, 09 Sep 2004 16:57:28 +0200

On Thu, 2004-09-09 at 08:49 -0400, Aaron Bentley wrote:
> 1. it accepted .id files that had a corresponding directory (directories 
> use =id files, not .id)
> 2. it accepted .id files that had a corresponding non-source file
> 3. it accepted .id files for files that had an automatic id.
> If I had written the kind of test you're proposing, it would not have 
> caught 3, because I never imagined that condition.  What other 
> conditions might we have forgotten about?

You have forgotten about "names" tagging-method where all explicit ids
are superfluous.

I like "names", it's like anonymous branches: it makes me look savvy
when I point it out as a corner case :-)

> It's far more robust to say: "The following explicit id files aren't 
> used, so they don't belong in the tree.  Use delete-id to remove them." 
>   It's simple, it's true, and it requires no guesswork.

It should be "use rm to delete them".

Since what is reported is the name of incriminated explicit id files, to
use delete-id the user has to do a lot of annoying path arithmetic.

"tla add" should probably check that the inventory id of the file is
actually useh. If it is not used, it should be removed and "tla add"
should fail noisily.

However, the "check if the explicit id is consistent with the id file"
test can be defeated by pathologic explicit ids. If the explicit id is
ignored, and the inventory id happens to be the same as what the
explicit id would set, then we have an false negative.

Actually, since explicit ids produce distinct inventory ids, the only
case where that would be a problem (with current inventory rules) is for
directories with an explicit id in the parent directory.

In any case, you cannot entirely factor out the knowledge of the
inventory rules from tree-lint.

                                                            -- ddaa

reply via email to

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