diff hgext/uncommit.py @ 42940:2da754532dd3

uncommit: enable support for adding a note This comes from the evolve extension's version of uncommit. The logic was already in place, and appears to be the last of the trivial things that can be enabled. Should these note options (including on amend) be marked advanced to keep the help text clutter level down? Differential Revision: https://phab.mercurial-scm.org/D6857
author Matt Harbison <matt_harbison@yahoo.com>
date Sun, 15 Sep 2019 00:07:30 -0400
parents 66048f6b5d0d
children 44be33cf7a57
line wrap: on
line diff
--- a/hgext/uncommit.py	Sat Sep 14 23:41:31 2019 -0400
+++ b/hgext/uncommit.py	Sun Sep 15 00:07:30 2019 -0400
@@ -111,7 +111,8 @@
 @command('uncommit',
     [('', 'keep', None, _('allow an empty commit after uncommiting')),
      ('', 'allow-dirty-working-copy', False,
-    _('allow uncommit with outstanding changes'))
+    _('allow uncommit with outstanding changes')),
+     (b'n', b'note', b'', _(b'store a note on uncommit'), _(b'TEXT'))
     ] + commands.walkopts + commands.commitopts + commands.commitopts2
     + commands.commitopts3,
     _('[OPTION]... [FILE]...'),
@@ -129,6 +130,7 @@
     """
     opts = pycompat.byteskwargs(opts)
 
+    cmdutil.checknotesize(ui, opts)
     cmdutil.resolvecommitoptions(ui, opts)
 
     with repo.wlock(), repo.lock():