diff -r 681e28b06256 committing.rst --- a/committing.rst Mon Aug 03 18:55:17 2015 +0200 +++ b/committing.rst Tue Aug 04 13:06:39 2015 +1000 @@ -36,9 +36,19 @@ Patch checklist ''''''''''''''' -Apart from running the tests, there's a simple patch checklist that -``make patchcheck`` (or ``./python.exe Tools/scripts/patchcheck.py`` on -Windows) will run through: +Along with running the tests, a simple automated patch checklist, `patchcheck`, +guides a developer through the common patch generation checks. To run +`patchcheck`: + + On `UNIX` (including Mac OS X):: + + make patchcheck + + On `Windows`:: + + PCBuild/python.exe Tools/scripts/patchcheck.py + +The automated patch checklist runs through: * Are there any whitespace problems in Python files? (using ``Tools/scripts/reindent.py``) @@ -52,10 +62,9 @@ * Has ``configure`` been regenerated, if necessary? * Has ``pyconfig.h.in`` been regenerated, if necessary? -Note that the automated patch check can't actually *answer* all of these -questions, and even if it could, it still wouldn't know whether or not -those answers were appropriate. Aside from the whitespace checks, it is just -a memory aid to help with remembering the various elements that can go into +The automated patch check doesn't actually *answer* all of these +questions. Aside from the whitespace checks, the tool is +a memory aid for the various elements that can go into making a complete patch. @@ -274,12 +283,14 @@ Minimal Configuration --------------------- -To use Mercurial as a committer (both of your and others' patches), you should -set up some basic options in your `configuration file`_. Under Windows, -TortoiseHg has a graphical settings dialog for most options, meaning you -don't need to edit the file directly (it is still available in -``%USERPROFILE%\Mercurial.ini``). Under other platforms, you must edit -``~/.hgrc``. +If you use Mercurial as a committer of patches (your own or others), you should +set up some basic options in your `configuration file`_. + +* On `UNIX` (including Mac OS X), you must edit ``~/.hgrc``. +* Under `Windows`, use TortoiseHg's graphical settings dialog to make changes + to ``mercurial.ini``. Alternatively, you may edit the file directly at + ``%USERPROFILE%\mercurial.ini``). + Here are the minimal options you need to activate: @@ -298,11 +309,11 @@ [diff] git = on -Under Windows, you should also enable the `eol extension`_, which will -fix any Windows-specific line endings your text editor might insert when you -create or modify versioned files. The public repository has a hook which -will reject all changesets having the wrong line endings, so enabling this -extension on your local computer is in your best interest. +* *Under Windows*, you should also enable the `eol extension`_, which will + fix any Windows-specific line endings your text editor might insert when you + create or modify versioned files. The public repository has a hook which + will reject all changesets having the wrong line endings, so enabling this + extension on your local computer is in your best interest. As a core developer, it can be very helpful to set up the same commit checks locally that the main repo enforces for incoming patch sets. This can save a @@ -312,7 +323,8 @@ Configuring and using the whitespace checking hook found in the `hooks repository`_ will help check incoming patch sets. To configure a hook, -add configuration settings to ``~/.hgrc`` for the relevant repo(s) (remember +add configuration settings to ``~/.hgrc`` (``mercurial.ini`` on Windows) +for the relevant repo(s) (remember to adjust the path appropriately for the checked out location of the `hooks repository`_). To configure a "pretxncommit" hook that will check whitespace before the changeset is committed and can thus abort the commit @@ -363,7 +375,7 @@ developers. The easiest way to do this is by using the `share extension`_, that can be -enabled by adding the following lines to your ``~/.hgrc``:: +enabled by adding the following lines to your ``~/.hgrc`` (``mercurial.ini`` on Windows):: [extensions] share = @@ -383,7 +395,7 @@ in each clone to update its working copy). If you don't want to specify ssh://hg@hg.python.org/cpython every time you pull -or push, you should add to the ``.hg/hgrc`` files of the clones:: +or push, you should add to the ``.hg/hgrc`` (``.hg/hgrc`` on Windows as well) files of the clones:: [paths] default = ssh://hg@hg.python.org/cpython