D544: releasenotes: update docstrings with information on additional flags

rishabhmadan96 (Rishabh Madan) phabricator at mercurial-scm.org
Mon Aug 28 18:57:19 UTC 2017


rishabhmadan96 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  This patch adds documentation related to the two new flags --check and
  --list for releasenotes extension.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D544

AFFECTED FILES
  hgext/releasenotes.py

CHANGE DETAILS

diff --git a/hgext/releasenotes.py b/hgext/releasenotes.py
--- a/hgext/releasenotes.py
+++ b/hgext/releasenotes.py
@@ -550,6 +550,31 @@
     this command and changes should not be lost when running this command on
     that file. A particular use case for this is to tweak the wording of a
     release note after it has been added to the release notes file.
+
+    With -c/--check option, you can check the commit message for any invalid
+    admonition. In case of an invalid admonition, the flag returns the name
+    of admonition along with the changeset ID. Incase the incorrect admonition
+    is similar to the available admonitions upto a certain threshold, it
+    suggests the correct admonition to you.
+
+    .. abcd::
+
+       First paragraph under this admonition
+
+    For the above commit message, using `hg releasenotes -r . --check`
+    returns: Invalid admonition 'abcd' present in changeset 3ea92981e103
+
+    .. fixes::
+
+       Fixes issue1234
+
+    For the above commit message, using `hg releasenotes -r . --check`
+    returns: Invalid admonition 'fixes' present in changeset 687be3ff87c6
+    (did you mean fix?)
+
+    With -l/--list option, you will be presented with a list of the existing
+    available admonitions along with their title. This also includes the
+    custom admonitions (if any).
     """
     sections = releasenotessections(ui, repo)
     if opts.get('list'):



To: rishabhmadan96, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list