Patchwork D544: releasenotes: update docstrings with information on additional flags

login
register
mail settings
Submitter phabricator
Date Sept. 10, 2017, 5:36 p.m.
Message ID <1bc5bc8116e825949865015826055f5a@localhost.localdomain>
Download mbox | patch
Permalink /patch/23747/
State Not Applicable
Headers show

Comments

phabricator - Sept. 10, 2017, 5:36 p.m.
rishabhmadan96 updated this revision to Diff 1690.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D544?vs=1368&id=1690

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

AFFECTED FILES
  hgext/releasenotes.py

CHANGE DETAILS




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

Patch

diff --git a/hgext/releasenotes.py b/hgext/releasenotes.py
--- a/hgext/releasenotes.py
+++ b/hgext/releasenotes.py
@@ -550,6 +550,33 @@ 
     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.
+
+    The -c/--check option checks the commit message for invalid admonitions.
+    In case of an invalid admonition, the flag returns the name of admonition
+    along with the changeset ID. For example::
+
+       .. abcd::
+
+          First paragraph under this admonition
+
+    For the above commit message, using `hg releasenotes -r . --check`
+    returns: Invalid admonition 'abcd' present in changeset 3ea92981e103
+
+    If an invalid admonition is similar to the available admonitions upto
+    a certain threshold, the correct admonition will be suggested.
+    For example::
+
+       .. 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?)
+
+    The -l/--list option, presents the user with a list of existing available
+    admonitions along with their title. This also includes the custom
+    admonitions (if any).
     """
     sections = releasenotessections(ui, repo)
     if opts.get('list'):