Re: git status update?
- From: Kristian Høgsberg <krh redhat com>
- To: Frederic Peters <fpeters gnome org>
- Cc: Owen Taylor <otaylor redhat com>, gnome-infrastructure gnome org
- Subject: Re: git status update?
- Date: Wed, 04 Mar 2009 10:06:57 -0500
On Wed, 2009-03-04 at 14:14 +0100, Frederic Peters wrote:
> Owen Taylor wrote:
>
> > Commit mails now match what I described, but actually, the part that I
> > would suggest you use hasn't changed. I'm not very comfortable with
> > people parsing the subject and body, because that results in some
> > combination of unreadable subject and body and scripts that break when
> > we try to improve thing.
>
> At the moment build.gnome.org parses the svn-commits emails and
> extracts:
>
> - commiter, using the From header (but in git, shouldn't it (also?)
> look at the Author: field)
> - module name, using the Subject header (will be X-Topics)
> - revision, (will be X-Git-Newrev, but see below)
> - URL, (will be constructed, even though I would still like it in
> the email)
> - list of added, modified and removed files (this list is then used
> to mark commits touching only /po/ as less important, note the
> distinction is not really useful, and the list of files as given
> be diffstat is enough)
> - commit message
>
> So currently it will have to parse the body to get the author, the
> list of files and the commit message. I don't think it is doable to
> cram all of this into custom and structured headers.
I don't know how buildbot works in detail, but it sounds like you're
trying to not rebuild too often by skipping commits that only change
files in po/. Instead of relying on the commit mails to provide all
this info, you could just trigger a rebuild every time, but bail out
early if the buildbot updates and only finds po/ changes. It's a lot
easier to get this data from a git repo than from parsing a commit mail
that could change.
For example, keep the SHA1 hash of the last rebuild around and then do
something like
git pull
LAST_BUILD=$(cat .git/LAST_BUILD)
git diff --raw $LAST_BUILD HEAD | grep -q -v po/ || exit 0
# Update LAST_BUILD and start a new build
git log $LAST_BUILD..HEAD > changes-since-last-build
git show-ref -s HEAD > git/LAST_BUILD
make
where the git log line gives you info about the commits since the last
build and you can do stuff like
$ git log --pretty=format:"%an <%ae>: %s" $LAST_BUILD..HEAD
to get custom output like this:
Kristian Høgsberg <krh redhat com>: Add a CopyBuffer extension to help EGL loaders implement swap buffer.
Brian Paul <brianp vmware com>: gallium: use the TGSI_TEXTURE_SHADOW1D/2D/RECT texture types for TEX instructions
and to include a diff stat use
$ git diff --stat $LAST_BUILD HEAD
There's plenty of flexibility here, but the main point is, don't extract
this from the commit email, just use it as a trigger and the get the
info from the git repo after pulling the new commits.
cheers,
Kristian
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]