Closed Bug 551557 Opened 14 years ago Closed 12 years ago

Requesting hook installed into tamarin-redux and tamarin-central

Categories

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

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: brbaker, Assigned: aravind)

Details

Attachments

(1 file, 2 obsolete files)

The tamarin team would like the following hook added to tamarin-redux and tamarin-central

[hooks]
pretxnchangegroup.general = python ./utils/hooks/general.py
Assignee: nobody → server-ops
Component: Hg: Customizations → Server Operations
QA Contact: hg.customizations → mrz
In this case, where you're running a Python script, wouldn't it be a lot easier to hook into the running Python interpreter with a function. Should be faster, at least. (You'd have to run python:utils/hooks/general.py:somefunction instead.)

Also, is that file supposed to be in the repository? That's unusual. I'd recommend putting the hooks in the separate hooks repo that Mozilla maintains.
What is the repo location that other hooks are located in?

I think it would be safest to keep the hook outside of the repo that it is being executed against.
Attached file hook script (obsolete) —
Attachment #432550 - Flags: review?(dschaffe)
Assignee: server-ops → aravind
Comment on attachment 432550 [details]
hook script

looks good.  some suggestions:  could keep hash keys in a list, we could keep some of the data in a separate csv file but may be easier to keep everything in a single script.  also may want to check exit code of hg log.  how do we know the script is working?  Could we check exit code and sys.exit("hg log not working") or something.
Attachment #432550 - Flags: review?(dschaffe) → review+
Is this hook ready to be installed?
It was mentioned (in comment #1) that the hook could be checked into another "hooks" mercurial repo, I am just wonder what the repo is so that I can request permission to push to the repo so that we can update the script as needed.
Attached file v2 hook script (obsolete) —
Tweak the hook script to check the status code of the call to 'hg log', if the status is not 0 then report script failure, but allow checkin.
Attachment #432550 - Attachment is obsolete: true
http://hg.mozilla.org/hgcustom/hghooks/
- is this a repo that I can get commit privileges to?
- what is a desired location for putting in a tamarin specific script?
Ted should be able to give us an answer for comment 9.
Brent: I believe anyone with access to hg.mozilla.org can land changes in hghooks. You're welcome to put any hooks that are in use on hg.mozilla.org in there. If they're in-process python hooks, then they should go in the "mozhghooks" subdir. If they're out-of-process hooks, they can just go in the top of that repo (the hg_require_single_head hook is a shell script).

Note that for convenience, everything else in that repo is licensed under the GPL.
hook script added to hghooks repo: 
http://hg.mozilla.org/hgcustom/hghooks/rev/31d1fb3b3a31
Deployed hook into tamarin-central and tamarin-redux.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Script changed to use a single master_hook that we can then hang more hg checks too as needed.
Attachment #433356 - Attachment is obsolete: true
We have changed the hook script to use inline python.  Could you please update the hgrc file in tamarin-central and tamarin-redux to now use tamarin-hook.py:master_hook :

[hooks]
pretxnchangegroup.general = python:/path/to/tamarin-hook.py:master_hook
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Done.
Status: REOPENED → RESOLVED
Closed: 14 years ago14 years ago
Resolution: --- → FIXED
Getting the following error message (which is blocking all commits):
remote: python: can't open file '/repo/hg/libraries/mozhghooks/tamarin-hook.py:master_hook': [Errno 2] No such file or directory
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Severity: normal → blocker
Priority: -- → P1
Okay, talked on irc and resolved this.
Severity: blocker → normal
Status: REOPENED → RESOLVED
Closed: 14 years ago14 years ago
Priority: P1 → --
Resolution: --- → FIXED
Severity: normal → blocker
Status: RESOLVED → VERIFIED
Priority: -- → P1
Aravind: Hey, I updated the hook for Bug 744427; can you redeploy hook (into tamarin-central and tamarin-redux).
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
Please file a new server ops bug rather than reuse an old one. (For one thing, Aravind no longer works for Mozilla.)
Status: REOPENED → RESOLVED
Closed: 14 years ago12 years ago
Resolution: --- → FIXED
Filed re-request as Bug 744777.
Product: mozilla.org → mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: