Closed Bug 422758 Opened 16 years ago Closed 16 years ago

Install a push-logging hook in mozilla-central

Categories

(mozilla.org Graveyard :: Server Operations, task)

x86
Linux
task
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: benjamin, Assigned: aravind)

References

Details

We want to be able to keep a log of 1) who pushed 2) what revision head 3) when to important repositories. I've written a hook which does this, and a companion hook which requires pushes to have one head at the end. The hooks are at http://hg.mozilla.org/users/bsmedberg_mozilla.com/hghooks/

We need to get this on the following repositories:

* mozilla-central
* actionmonkey
* tamarin-central
* tamarin-tracing

Proviso: there's a note in hgbook about how pretxnchangegroup hooks allow a window of time where the partly-committed transaction is visible to external code before it is rolled back. So I think we should follow the advice and have the "incoming" and "outgoing" repositories be separate:

http://hgbook.red-bean.com/hgbookch10.html#x14-20400010.3
Benjamin can you rough up the patch here?
Patch? Other than the two shell scripts and the sample config I posted, there's nothing else to do, I think.
Assignee: server-ops → aravind
I will work on this somemore tomorrow, but from looking at your config files it looks likes you are logging stuff to .hg/push-log.  Won't that get huge as time goes by?  Wouldn't we want to split that up into time-stamped versions, archive/trim them etc?  (I could be totally missing the point of this, if this isn't something server related)?
Well for right now, we just want to collect the data. In the future, we're going to want the mercurial process to have access to it so that we can alter the hgweb UI and the client so that you can ask questions like:

* Where did my local repo branch from mozilla-central?
* Annotate file X according to the history of mozilla-central
* etc

See http://developer.mozilla.org/en/docs/Mercurial/Desired_Features#Feature:_linear_history_according_to_a_particular_repository for a description of this work which we're going to contract out.

So eventually we might want to put this data into a more database-y format, but I'll leave that up to the contractor. Even at 50 commits/day it would take a long time for the file to get unmanageably large, right?
(In reply to comment #0)
> We need to get this on the following repositories:
> 
> * mozilla-central
> * actionmonkey
> * tamarin-central
> * tamarin-tracing

Done, all of those repositories are now logging stuff.


> Proviso: there's a note in hgbook about how pretxnchangegroup hooks allow a
> window of time where the partly-committed transaction is visible to external
> code before it is rolled back. So I think we should follow the advice and have
> the "incoming" and "outgoing" repositories be separate:
> 
> http://hgbook.red-bean.com/hgbookch10.html#x14-20400010.3
> 

That seems to be more for hooks that require a little bit of time to run.  The current logging and check scripts we have take hardly any time.  I'd like to keep things simple.  If we every get to the point that logging/checking hooks begin to impact things, we could probably do other things like log in the background etc.  In any case I say we deal with it when it becomes a problem.

Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Blocks: 425776
How do people look at the log generated by this hook?
(In reply to comment #6)
> How do people look at the log generated by this hook?

Bug 425776.
Product: mozilla.org → mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.