[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnu-arch-users] Alternate tagging method, [was arch with 'special files
From: |
John Meinel |
Subject: |
[Gnu-arch-users] Alternate tagging method, [was arch with 'special files'] |
Date: |
Tue, 29 Mar 2005 15:01:48 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040803 |
John Meinel wrote:
Tom Lord wrote:
From: Josh England <address@hidden>
...
So I would suggest the following changes, have the "categories" source,
not-source, source-w, not-source-w
source is a regex for including a file as source
not-source is evalutated after a match, and specifically regects a
match
source-w uses shell wildcard syntax
not-source-w should be obvious
Probably better names than source, precious, backup, junk. At least
precious should probably be something like "ignored".
Having had some time to think about it in the chair, this is a revised
category scheme, evaluated in order:
force-ignore
force-disallow
source
disallow
warn
ignore
ignore - say nothing about this file, do not enter the directory, even
if the file violates 7-bit rules, to arch, this file does not
exist. (It is a little hard to fit a 7-bit regex to an 8-bit
file, but I think we can make it work).
disallow - If present, this is a lint failure.
source - The obvious
warn - If present, warn about it's existence, but it is not an error
Then you would want the flags:
unrecognized disallow
untagged-source warn
This lets you handle the case where something doesn't match a regex, and
do something reasonable with it.
I'm still open to the idea of the "not-" forms, which allow direct
negation. They would only be evaluated if the normal form succeeded. But
it starts adding quite a few levels, which may be more confusing than
necessary. It is straightforward (force- evaluated first, normal, not-
evaluated after normal).
Also, I would like to see a per-user setting (say
~/.arch-params/ignored-files). It would have everything *but* source.
That way I can configure my Mac to always ignore .DS_Store and
.gdb_history, without having to worry about setting it in *every*
project config.
I don't think source should be in there, because then if someone checks
out my tree, the files instantly go missing. But with ignore/disallow a
checkout is clean. If I use my per-user to allow build output into my
tree and someone else checks it out and does a build, then there are
errors. But that is an okay failure mode, it isn't *really* harmful. tla
only creates source files.
Also, each of these could have a -w form. I'm pretty sure shell
expansion can be turned into a regex with simple substitution.
Shell => Regex
* => .*
? => .
| => \|
\* => \*
\\ => \\
, => |
+ => \+
[ => \[
] => \]
. => \.
...
Any other regex meta-characters that I've missed can probably just be
'\' escaped. The , => | is if we want to allow multiple shell expansions
per line. I certainly don't think we have to. You can always use
fnmatch, but translating lets the internal code stick to only regexes.
I don't know of any code inside tla that treats junk files differently
from precious or backup. There was some statement about copying working
trees, but as far as I know, that isn't done anymore.
If there is a genuine reason to have the different categories, we can
put them in.
The idea, though, is to give obvious names, and an obvious evaluation
order. By having the force-* entries, you can override a source regex
with an ignore one, so that stating exceptions becomes easier.
I think we can leave in the ',.*' and '+.*' as force-ignore.
I think these rules clean up the current tagging method headaches people
have. The naming scheme is cleaned up a little, and specifically
ignoring/including files should be pretty easy.
PS> As a minor point, I think all regexes should be full-match, not
search style. so regex="bc" doesn't match "AbcD". This eliminates the
need for ^$ everywhere. If necessary they could be added internally.
- [Gnu-arch-users] Re: arch with 'special files', (continued)
- [Gnu-arch-users] Re: arch with 'special files', Matthieu Moy, 2005/03/28
- Re: [Gnu-arch-users] arch with 'special files', John Arbash Meinel, 2005/03/28
- Re: [Gnu-arch-users] arch with 'special files', Josh England, 2005/03/29
- [Gnu-arch-users] Re: arch with 'special files', Matthieu Moy, 2005/03/29
- Re: [Gnu-arch-users] Re: arch with 'special files', Aaron Bentley, 2005/03/29
- [Gnu-arch-users] Re: arch with 'special files', Josh England, 2005/03/29
- [Gnu-arch-users] Re: arch with 'special files', John Meinel, 2005/03/29
- Re: [Gnu-arch-users] Re: arch with 'special files', tomas, 2005/03/30
- Re: [Gnu-arch-users] arch with 'special files', Tom Lord, 2005/03/29
- Re: [Gnu-arch-users] arch with 'special files', John Meinel, 2005/03/29
- [Gnu-arch-users] Alternate tagging method, [was arch with 'special files'],
John Meinel <=
Re: [Gnu-arch-users] arch with 'special files', Adrian Irving-Beer, 2005/03/28