[Top][All Lists]

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

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

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

Thank you.  This is a great idea.

May I ask you to revise it somewhat?  Perhaps others facing a similar
need can help since the revision I have in mind is fairly substantial.

I would like ids to be recorded in ~/.arch-params, not in

Setting an id should work like:

  tla my-project-id SCOPE ID

where SCOPE is any of:

  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

For example, to set my id for all transactions with some hypothetical
gnu archives I would use:

  tla my-project-id 'address@hidden/'  'Tom Lord <address@hidden>'

But there's an exception.   I want to use a different id when
committing to RMS' emacs categories:

  tla my-project-id 'address@hidden/emacs.*'  'Tom Lord (emacs hacking) 

In general, a "regexp set" is 1..4 regexps delimited similarly to
project names:


The function arch_my_id should accept a parameter -- the project name
for which an id is needed -- rather than being sensitive to the
current working directory.    It should be permitted for that
parameter to be 0 (meaning to just use the default id).

The list of SCOPEs abave is from most to least specific.   The id
whose scope is the most specific match of the project name passed to
arch_my_id should be used.

That leaves the task of filling in correct parameters in all the calls
to `arch_my_id' but that's the easy part :-)

Make sense?


    > Date: Thu, 22 Apr 2004 09:10:48 +0800
    > From: Russell <address@hidden>
    > Content-Type: text/plain; charset=us-ascii
    > Content-Disposition: inline
    > X-Boo: Boo!
    > X-message-flag: I see that you run Outlook...
    > X-System: Linux homer 2.4.18
    > X-Uptime: 02:11:54 up 2 days,  8:27,  1 user,  load average: 0.25, 0.24, 
    > User-Agent: Mutt/1.5.4i
    > X-BeenThere: address@hidden
    > X-Mailman-Version: 2.1.4
    > Precedence: list
    > Reply-To: Russell <address@hidden>
    > List-Id: a discussion list for all things arch-ish 
    > List-Unsubscribe: <>,
    >   <mailto:address@hidden>
    > List-Archive: <>
    > List-Post: <mailto:address@hidden>
    > List-Help: <mailto:address@hidden>
    > List-Subscribe: <>,
    >   <mailto:address@hidden>
    > Sender: address@hidden
    > X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on
    > X-Spam-DCC: : mail 1182; Body=1 Fuz1=1 Fuz2=1
    > X-Spam-Status: No, hits=-1.0 required=4.5 tests=BAYES_00 autolearn=ham 
    >   version=2.63
    > X-42email-MailScanner-Information: Please contact for more information.
    > X-42email-MailScanner: Found to be clean
    > X-UIDL: 31dc5672389e6e4f6cd1abbdcf4cb7a5
    > Hi,
    > While working on a couple of different projects on the one machine, I
    > found myself changing my-id between commits to different archives,
    > mainly to separate my work from my private projects, which I think
    > really should have different ids.
    > I thought that there should be a way to specify an id on a per-project
    > basis, so that the user's project id would be used if it existed, but
    > otherwise the user's "global" id from ~/.arch-params/=id would be used.
    > Here's a patch to implement that.  It does these things:
    > - Adds a new tla command, my-project-id.  'tla my-project-id' prints the
    >   id found in {arch}/++id, and 'tla my-project-id "A <address@hidden>"' 
sets it.
    > - Modifies arch_my_id() to return the project id if it exists, or the
    >   global id otherwise.  I believe that all parts of the code that
    >   require an id (the explicit tagging method, for example) will end up
    >   here.
    > - Adds a flag to init-tree, --id, which takes an arch id as argument,
    >   and sets the project id for the new project.
    > - Adds a test to to test both init-tree --id and
    >   my-project-id.
    > The project id file is called ++id to ensure that it does not get
    > committed, because this is obviously local to one developer and should
    > not be in the archive.
    > You can find the patch at
    >   address@hidden/tla--devo--1.3--patch-1
    > address@hidden/tla--devo--1.3--base-0 was tagged from
    > address@hidden/tla--devo--1.3--patch-1.
    > I guess this is where someone tells me that there is a really easy way
    > to do this already.  :)
    > [Aside: the process of producing things like this is made exceptionally
    > painless by tla itself, and also by config-manager, which makes building
    > different trees for comparison very easy.  Fantastic work by all
    > involved.]
    > -- 
    > Russell Steicke
    > -- Fortune says:
    > Avoid reality at all costs.
    > _______________________________________________
    > Gnu-arch-users mailing list
    > address@hidden
    > GNU arch home page:

reply via email to

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