[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnu-arch-users] hook questions
From: |
Dustin Sallings |
Subject: |
Re: [Gnu-arch-users] hook questions |
Date: |
Wed, 14 Jan 2004 11:24:33 -0800 |
On Jan 14, 2004, at 11:28, Tom Lord wrote:
I haven't exhaustively double-checked but I think that the
catch-phrase in the documentation is where it says that the variables
listed are passed "when appropriate". Not every hook is called with
every variable.
Right, I read that, just providing my point of view as to what I feel
is appropriate. :)
If there's some particular hook where you think a variable is needed
that isn't passed, let us know.
Is there a reason we definitely do not want the individual variables
set? While that seems to provide enough information, it means every
hook needs to parse the stuff (since I imagine it's going to be pretty
common need less than the full revision).
You mean something like setting ARCH_CATEGORY (normally only passed
for the `make-category' hook) in, say, `commit'?
That'd be fine.
Yes, but providing all of the parts separately. For example (the
directory I'm in now), I have the following patch log:
address@hidden/snippets--python--1.0--patch-9
Ideally, on a commit hook, having a separate variable for each of:
archive: address@hidden
category: snippets
branch: python
version: 1.0
patch: patch-9
(sorry, not looking up existing names) would make it easier to write
hooks to do specific things.
I've got a hook that does an archive-mirror with a limit based on the
category and branch names and I'm doing ugly shell stuff to build that
limit.
Secondly, is precommit run before figuring out what files have
changed? I.e. would it be an appropriate place to do some last-minute
modification of files?
No, it would be not. Currently the right place to do that is before
calling `commit'. Not much work gets done in `commit' before making
the changeset.
This came from a discussion I was having with someone I'm trying to
get to convert to arch. Basically, he's used to RCS tags to provide
version information in scripts and such, and I'm trying to point out
that files don't get versioned, entire projects do and that's the more
important component. However, getting a pointer to the source of the
code into app builds or individual scripts is definitely useful. A
hook that could, in the above example, replace
$ARCHVERSION.*$
with
$ARCHVERSION
address@hidden/snippets--python--1.0--patch-9 $
in a particular file or collection of files as part of the commit or
checkout would solve these problems.
--
Dustin Sallings
- [Gnu-arch-users] hook questions, Dustin Sallings, 2004/01/13
- Re: [Gnu-arch-users] hook questions, Tom Lord, 2004/01/14
- Re: [Gnu-arch-users] hook questions,
Dustin Sallings <=
- Re: [Gnu-arch-users] hook questions, Robert Collins, 2004/01/14
- Re: [Gnu-arch-users] hook questions, Dustin Sallings, 2004/01/14
- Re: [Gnu-arch-users] hook questions, Robert Collins, 2004/01/14
- Re: [Gnu-arch-users] hook questions, Dustin Sallings, 2004/01/14
- Re: [Gnu-arch-users] hook questions, Robert Collins, 2004/01/14
- Re: [Gnu-arch-users] hook questions, Dustin Sallings, 2004/01/14
- Re: [Gnu-arch-users] hook questions, Robert Collins, 2004/01/14