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

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

Re: [Gnu-arch-users] Re: [PATCH] my-project-id


From: Tom Lord
Subject: Re: [Gnu-arch-users] Re: [PATCH] my-project-id
Date: Thu, 22 Apr 2004 12:42:51 -0700 (PDT)

    > From: Stefan Monnier <address@hidden>

    >>   a fully qualified version name regexp set
    >>   a fully qualified branch name regexp set
    >>   a fully qualified category name regexp set
    >>   an archive name regexp set
    >>   an unqualified version name regexp set
    >>   an unqualified branch name regexp set
    >>   an unqualified category name regexp set

    > Isn't it overengineered a bit?

Somewhat, if viewed in isolation -- but it shouldn't be viewed in
isolation.

The idea of and syntax for a "regexp set" was invented by jblack for
rbrowse where it's quite handy.

I expect the general idea to eventually find many applications within
arch.

Since this is the second instance where something similar to regexp
sets is needed, before we get to "many" (as in, "one....two....many") 
it makes sense to just bottle up that functionality in a library
routine that the project-id code can happen to use.


    > Why not just set a regexp that will be matched against the fully
    > qualified version name?

That would be harder to use.

For that matter, I'm tempted to suggest that the last component in a
regexp set (version id) not be a regexp at all --- but be a range
expression of version-ids.   E.g.: 


        tla--.*--{1.1,1.2.1}

which matches 

      tla--devo--1.2

but not

      tla--devo--1.2.1.1

What do you think of that?


    > In order to add a notion of priority, you can either keep all
    > the REGEXP<->ID pairs in an ordered list and let the user change
    > the ordering,


Now that you mention it --- even within regexp lists, there is a need
for order.   For example, what happens with:


    % tla my-project-id tla--.*  ID1
    % tla my-project-id .*--devo ID2

    % tla my-project-id tla--devo--1.2
    ????

What's the output?  ID1 or ID2?  So, yes some mechanism is needed for
users to order these things.


-t





reply via email to

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