Closed
Bug 559355
Opened 15 years ago
Closed 15 years ago
Add mercurial hook to repos to enforce no-tab policy
Categories
(Tamarin Graveyard :: Tools, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
Future
People
(Reporter: cpeyer, Assigned: jsudduth)
References
Details
Once we have complete converting all tabs to spaces in the repo (see Bug 556357) we should enforce the policy by rejecting any commits with tabs in the source.
Flags: flashplayer-qrb?
Updated•15 years ago
|
Flags: flashplayer-qrb? → flashplayer-qrb+
Target Milestone: --- → Future
Updated•15 years ago
|
Assignee: nobody → jsudduth
Flags: flashplayer-triage+
Updated•15 years ago
|
Status: NEW → ASSIGNED
Comment 1•15 years ago
|
||
How does this relate to http://asteam/hg/qe/rev/83124128b1be ?
Reporter | ||
Comment 2•15 years ago
|
||
This and bug 562199 are pretty much the same except for the hook placement. The script checked into the qe repo is a commit hook that runs on the users local machine every time they do a commit. This bug is for the script that runs on the hg server.
Unfortunately, it is not possible to have user interaction for pretxnchangegroup server hooks, so I'm not sure we want to enforce tabs here in case someone does want to push a tab into the repo. The downside of using a pretxncommit hook is that it must be setup on every end users machine, but I think that's doable for our team.
If we do want to enforce on the server side, the script from bug 562199 is usable with a few minor modifications.
What is the tradeoff between the submit hook being local vs. server? Server-side hooks would seem to be easier to maintain and would ensure consistency of submissions. Are there other considerations?
Reporter | ||
Comment 4•15 years ago
|
||
There are two issues with a server hook:
1. It is not possible to have user interaction with server side hooks. I feel that this is necessary as there may be times that we do want to override the hook.
2. When the hook is run locally it is run for each commit. On the server, the user may have done a bunch of local commits and then they are all pushed to the server. If one of the earlier commits in the bunch violates the hook, it is a pain for the end user to back out all of the commits after the violation to fix the violation and then reapply the commits.
I plan on pushing the local commit hook into the redux repo. It is then just a matter of adding 2 lines to the .hg/hgrc (or even better, the ~/.hgrc file so that all repos are covered). It shouldn't be too hard to coerce everybody to make the local change.
Reporter | ||
Comment 5•15 years ago
|
||
Commit hook has been pushed into tr: http://hg.mozilla.org/tamarin-redux/rev/d64894332c42
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Reporter | ||
Updated•15 years ago
|
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•