This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: document hg commit hooks in the devguide
Type: Stage: resolved
Components: Devguide Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: eli.bendersky Nosy List: brett.cannon, eli.bendersky, eric.araujo, ezio.melotti, georg.brandl, petri.lehtinen, python-dev
Priority: normal Keywords: patch

Created on 2011-11-12 18:46 by eli.bendersky, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue13388.1.patch eli.bendersky, 2011-11-12 19:10
issue13388.2.patch eli.bendersky, 2011-11-13 23:04
Messages (14)
msg147520 - (view) Author: Eli Bendersky (eli.bendersky) * (Python committer) Date: 2011-11-12 18:46
----
Our Hg repo has some useful hooks on commit messages that allow to
specify which issue to notify for commits, and which issue to close.
AFAIU, it's currently documented only in the code of the hook
(http://hg.python.org/hooks/file/tip/hgroundup.py).

I think adding a short description into the devguide would be a good
idea, probably here:
http://docs.python.org/devguide/committing.html#commit-messages-and-news-entries
----

+1d by Brett and Georg on pydev. I'll prepare a patch.
msg147522 - (view) Author: Eli Bendersky (eli.bendersky) * (Python committer) Date: 2011-11-12 19:10
Attaching a patch with the suggested change. Based on the doc-string in the implementation of the hook.
msg147524 - (view) Author: Petri Lehtinen (petri.lehtinen) * (Python committer) Date: 2011-11-12 19:14
I'm not sure if it matters, but Sphinx documentation suggests using ^ as the underlining character for subsubsections.

Otherwise, looks good.
msg147525 - (view) Author: Eli Bendersky (eli.bendersky) * (Python committer) Date: 2011-11-12 19:19
Petri, I have actually tried to stay consistent within the same document, and it uses ' for this level of heading. Perhaps it's just not following the Sphinx guide?

IIRC the restructured text parser will also shout at you if these are inconsistent.
msg147526 - (view) Author: Petri Lehtinen (petri.lehtinen) * (Python committer) Date: 2011-11-12 19:20
Ah, sorry. I didn't check other files in the devguide. The ReST parser is OK with any underline character, as long as it's consistent within a single file.
msg147559 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011-11-13 16:45
New changeset e4fcac92a80a by Ezio Melotti in branch 'default':
Closes #2771. #13388 now needs to be updated.
http://hg.python.org/test/rev/e4fcac92a80a
msg147560 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2011-11-13 16:46
...because the hook now supports multiple issue id in the same commit message.
msg147568 - (view) Author: Eli Bendersky (eli.bendersky) * (Python committer) Date: 2011-11-13 19:04
Nice, I didn't know about issue #2771 ;-)

Will update the patch!
msg147575 - (view) Author: Eli Bendersky (eli.bendersky) * (Python committer) Date: 2011-11-13 23:04
An updated patch attached, explaining that several issues can be mentioned in a single commit message
msg147610 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-11-14 16:53
+1 to most of the patch, except one piece of wording: “commit message hooks”.  This does not occur in the Mercurial documentation or help, and is misleading (commits happen on your maching, the hooks run on the server).  I’d just use “hooks” or “Mercurial hooks”.
msg147718 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011-11-15 22:48
New changeset 21758f27f98f by Eli Bendersky in branch 'default':
document existing hooks for commit messages mentioning issues. Closes issue 13388
http://hg.python.org/devguide/rev/21758f27f98f
msg147719 - (view) Author: Eli Bendersky (eli.bendersky) * (Python committer) Date: 2011-11-15 22:49
Committed, with the fix suggested by Éric
msg147876 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-11-18 14:48
> The commit details (including its changeset, branch and commit message)

In Mercurial terminology, a changeset *is* a commit (or if you really want to make a distinction, a commit is the action that creates a changeset).  I think you meant “diff”.  Moreover, only the first line of the commit message is added, which is IMO worth mentioning.  Finally, I think we should recommend the “#12345” style: For one thing, it makes our hgweb application create links.
msg147927 - (view) Author: Eli Bendersky (eli.bendersky) * (Python committer) Date: 2011-11-19 06:12
Éric, feel free to fix it to your heart's desire ;-) I think that having it documented is far more important than nuances in nomenclature, so I'm -0 on this.
History
Date User Action Args
2022-04-11 14:57:23adminsetgithub: 57597
2011-11-19 06:12:50eli.benderskysetmessages: + msg147927
2011-11-18 14:48:31eric.araujosetmessages: + msg147876
2011-11-16 06:56:31ezio.melottisetstatus: open -> closed
resolution: fixed
stage: resolved
2011-11-15 22:49:21eli.benderskysetstatus: closed -> open
resolution: fixed -> (no value)
messages: + msg147719

stage: resolved -> (no value)
2011-11-15 22:48:42python-devsetstatus: open -> closed
resolution: fixed
messages: + msg147718

stage: resolved
2011-11-14 16:53:03eric.araujosetnosy: + eric.araujo
messages: + msg147610
2011-11-13 23:04:07eli.benderskysetfiles: + issue13388.2.patch

messages: + msg147575
2011-11-13 19:04:11eli.benderskysetmessages: + msg147568
2011-11-13 16:46:52ezio.melottisetmessages: + msg147560
2011-11-13 16:45:21python-devsetnosy: + python-dev
messages: + msg147559
2011-11-12 19:20:24petri.lehtinensetmessages: + msg147526
2011-11-12 19:19:06eli.benderskysetmessages: + msg147525
2011-11-12 19:14:39petri.lehtinensetnosy: + petri.lehtinen
messages: + msg147524
2011-11-12 19:10:27eli.benderskysetfiles: + issue13388.1.patch
keywords: + patch
messages: + msg147522
2011-11-12 18:46:29eli.benderskycreate