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

[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
$(project_tree)/{arch}.

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) 
<address@hidden>'

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

  ARCHIVE_REGEXP/CATEGORY_REGEXP--BRANCH_REGEXP--VERSION_REGEXP


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?

-t






    > 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, 
0.10
    > 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 
<gnu-arch-users.gnu.org>
    > List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/gnu-arch-users>,
    >   <mailto:address@hidden>
    > List-Archive: <http://mail.gnu.org/pipermail/gnu-arch-users>
    > List-Post: <mailto:address@hidden>
    > List-Help: <mailto:address@hidden>
    > List-Subscribe: <http://mail.gnu.org/mailman/listinfo/gnu-arch-users>,
    >   <mailto:address@hidden>
    > Sender: address@hidden
    > X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on mail.42inc.com
    > 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 
http://www.42inc.com/support.html 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 test-import.sh 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
    >   http://adelie.cx/archives/address@hidden/
    > 
    > 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
    > http://mail.gnu.org/mailman/listinfo/gnu-arch-users
    > 
    > GNU arch home page:
    > http://savannah.gnu.org/projects/gnu-arch/
    > 
    > 




reply via email to

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