The complete guide on how to submit an NGINX change using Mercurial
Step 1
Clone the repo
hg clone http://hg.nginx.org/nginx
Step 2
make the change
vim conf/mime.types
hg diff
See your change
Step 3
Make a new branch
hg branch update-mime-types
Step 4
Edit the config and add username
hg config --edit
Inside the config file
[ui]
username = Person McPersonface <pmcpersonface@gmail.com>
Step 5
Make the commit
hg ci
This should open up your editor and you can write your commit message, the first line is the subject of less than 67 characters. Add a blank line and then add a paragraph with no more than 67 characters per line explaining the change
Step 6
View the patch
hg export
Make sure it looks the way you want, if it doesn’t follow step 6a.
Step 6a
If you need to make changes
hg export # copy your commit message and save it somewhere
hg rollback
vim conf/mime.types
edit the file to make changes
hg ci
Edit the commit message again with a new one or the one you copied over
Step 7
Set up email to email the patch over
vim ~/.hgrc
Add this into the config file
[extensions]
hgext.patchbomb =
[email]
from=Person McPersonface <pmcpersonface@gmail.com>
method=smtp
[smtp]
host=smtp.gmail.com
port=587
username=pmcpersonface@gmail.com
password=SuperSecretPassword@!@#1234
tls=True
If you’re using gmail you’ll have to temporarily enable “less secure app access” by going to google account -> security -> less secure app access
Step 8
Email the patch.
First sign up for the mailing list and change “Receive acknowledgement mail when you send mail to the list?” to yes and click save in the mailing list subscriber settings.
Then wait 30 minutes.
Then
hg email --to nginx-devel@nginx.org -r tip --confirm
Make sure it looks the way you want (the entire diff won’t be shown)
I hit enter when I saw the Cc:
line
And then hit “y” then enter
You should get a confirmation email in your inbox.
Step 9
Don’t forget to turn off less secure app access