Bug 1375800 - [doc] add tips to create a patch file in devtools docs;r=sole

MozReview-Commit-ID: UjS3p5Tl3g

--HG--
extra : rebase_source : 95ed1c5a6f8d85bffd982e138cc02f969207e028
This commit is contained in:
Julian Descottes 2017-06-23 11:22:49 +02:00
Родитель 9737c986a6
Коммит e521c65082
1 изменённых файлов: 18 добавлений и 8 удалений

Просмотреть файл

@ -2,14 +2,24 @@
<!-- TODO: this will need to be updated in the future when we move to GitHub -->
## Creating a patch
To create a patch you need to first commit your changes and then export them to a patch file.
With Mercurial:
* `hg commit -m 'your commit message'`
* `hg export > /path/to/your/patch`
With Git, the process is similar, but you first need to add an alias to create Mercurial-style patches. Have a look at [the detailed documentation](https://developer.mozilla.org/en-US/docs/Tools/Contributing#Creating_a_patch_to_check_in).
## Commit messags
Commit messages should follow the pattern `Bug 1234567 - change description. r=reviewer`
First is the bug number related to the patch. Then the description should explain what the patch changes. The last part is used to keep track of the reviewer for the patch.
## Submitting a patch
Once you have a patch file, add it as an attachment to the Bugzilla ticket you are working on and add the `feedback?` or `review?` flag depending on if you just want feedback and confirmation you're doing the right thing or if you think the patch is ready to land respectively. Read more about [how to submit a patch and the Bugzilla review cycle here](https://developer.mozilla.org/en-US/docs/Developer_Guide/How_to_Submit_a_Patch).
You can also take a look at the [Code Review Checklist](./code-reviews.md) as it contains a list of checks that your reviewer is likely to go over when reviewing your code.
## Posting patches as gists
* Install gist-cli: `npm install -g gist-cli`
* In your bash profile add:
* git: `alias gist-patch="git diff | gist -o -t patch"`
* hg: `alias gist-patch="hg diff | gist -o -t patch"`
* Then go to a clean repo, modify the files, and run the command `gist-patch`