Closed
Bug 676508
Opened 14 years ago
Closed 14 years ago
Fix misleading comment - hooks are run in the order in which they are seen
Categories
(Developer Services :: Mercurial: hg.mozilla.org, defect)
Developer Services
Mercurial: hg.mozilla.org
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: jwatt, Assigned: jwatt)
Details
Attachments
(1 file)
|
838 bytes,
patch
|
ted
:
review+
|
Details | Diff | Splinter Review |
The comment in hgcustom/hghooks/example-hgrc is totally wrong and misleading. It may have been true at some point that hg hooks were run in alphabetical order, but that is definitely no longer the case. Hooks are run in the order in which they are seen during parsing of the hg config files. Not only is it not possible to reorder hooks in a given file purely by changing the names of the hooks, it's also not possible to stop hooks defined in the user's ~/.hgrc from running before the same type of hooks in the repo .hg/hgrc (since the former file is parsed before the latter).
Of course I'm assuming here that we haven't hacked the mercurial installs we have to make hooks run in alphabetical order, but I don't see anything in https://hg.mozilla.org/hgcustom/ to suggest that we have.
| Assignee | ||
Comment 1•14 years ago
|
||
Comment 2•14 years ago
|
||
It was true in a previous version of hg, FWIW.
Updated•14 years ago
|
Attachment #550653 -
Flags: review?(ted.mielczarek) → review+
Comment 3•14 years ago
|
||
Yeah, they changed the ordering system at some point, and we've been having problems with it ever since...
| Assignee | ||
Comment 4•14 years ago
|
||
It's a two or so line patch to add support to hg for a config flag that would cause the hooks to be sorted before calling them. If that would be useful to us I'd be happy to propose that patch to the hg guys.
| Assignee | ||
Comment 5•14 years ago
|
||
Benjamin, is that worth doing?
Comment 6•14 years ago
|
||
I believe they have rejected that in the past, take a look through the mercurial list archives.
| Assignee | ||
Comment 7•14 years ago
|
||
Ok, thanks.
Pushed https://hg.mozilla.org/hgcustom/hghooks/rev/a4b9d91337c5
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Updated•12 years ago
|
Product: mozilla.org → Release Engineering
Updated•11 years ago
|
Product: Release Engineering → Developer Services
You need to log in
before you can comment on or make changes to this bug.
Description
•