Posted 4 years, 9 months ago at 17:46. 7 comments
The Mozilla RelEng team was having one of our patented digressional discussions in IRC yesterday when we got around to the subject of hg irritations. My personal annoyance was that I frequently need to check-in patches for other people who don’t have commit access, but I don’t always remember to check before pushing to make sure I didn’t miss adding any new files created by the patch.
Because Ted is more about solving problems than bitching about them, he suggested I write a hook to prevent myself from missing files. Here it is:
precommit = hg status | (! grep '^?')
Add that to your .hgrc file (and setup some good global hgignore rules) and you’re golden.