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

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

Re: [Gnu-arch-users] Patch : precomimt hook


From: Robert Collins
Subject: Re: [Gnu-arch-users] Patch : precomimt hook
Date: Wed, 01 Oct 2003 22:04:14 +1000

On Wed, 2003-10-01 at 20:12, Erik de Castro Lopo wrote:
> Hi all,
> 
> I spent about 10 mintues hacking around in the tla code (very clean and
> well organised) and came up with the following patch. It adds another
> hook called "precommit", which gets called at the start of the 
> "tla commit" command. If the hook script returns a non-zero error
> code the commit will be aborted so that errors can be corrected before
> the commit is attempted again. 
> 
> One simple use for this feature is to do a make in the hook script. If
> the code fails to build, the commit fails, hence no more broken code
> in the archive.
> 
> I've been running the patched version for a day now (still learning,
> making new test archives from scratch etc) and I don't think I have
> broken anything, but obviously I can't have covered every possibility.
> 
> OK, patch (agains 1.1pre5) below my .sig. Whats the chance of this going 
> in?

Cute. I haven't looked at the code in detail yet - does it check before
or after the changeset is generated?

After generation would make sense to me because:
* Code reformatting (astyle/indent) on commit needs the list of files
that have been altered to reindent.
* regression test overhead can be avoided if tree-linting fails - that
is if tla wouldn't allow the commit anyway.

Cheers,
Rob
-- 
GPG key available at: <http://members.aardvark.net.au/lifeless/keys.txt>.

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

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