Patchwork D1095: amend: add a flag `-n/--note` to store note with amend

login
register
mail settings
Submitter phabricator
Date Oct. 17, 2017, 1:47 a.m.
Message ID <626e0505743759c8920ff8b076f12efa@localhost.localdomain>
Download mbox | patch
Permalink /patch/25059/
State Not Applicable
Headers show

Comments

phabricator - Oct. 17, 2017, 1:47 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGfdec31766a51: amend: add a flag `-n/--note` to store note with amend (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1095?vs=2785&id=2875

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

AFFECTED FILES
  hgext/amend.py
  tests/test-amend.t

CHANGE DETAILS




To: pulkit, #hg-reviewers, dlax, yuja, durin42
Cc: yuja, mercurial-devel

Patch

diff --git a/tests/test-amend.t b/tests/test-amend.t
--- a/tests/test-amend.t
+++ b/tests/test-amend.t
@@ -193,6 +193,14 @@ 
   |/
   o  0 426bada5c675 A
   
+Checking the note stored in the obsmarker
+
+  $ echo foo > bar
+  $ hg add bar
+  $ hg amend --note "adding bar"
+  $ hg debugobsolete -r .
+  112478962961147124edd43549aedd1a335e44bf be169c7e8dbe21cd10b3d79691cbe7f241e3c21c 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'amend', 'user': 'test'}
+  be169c7e8dbe21cd10b3d79691cbe7f241e3c21c 16084da537dd8f84cfdb3055c633772269d62e1b 0 (Thu Jan 01 00:00:00 1970 +0000) {'note': 'adding bar', 'operation': 'amend', 'user': 'test'}
 #endif
 
 Cannot amend public changeset
diff --git a/hgext/amend.py b/hgext/amend.py
--- a/hgext/amend.py
+++ b/hgext/amend.py
@@ -33,6 +33,7 @@ 
       _('mark new/missing files as added/removed before committing')),
      ('e', 'edit', None, _('invoke editor on commit messages')),
      ('i', 'interactive', None, _('use interactive mode')),
+     ('n', 'note', '', _('store a note on the amend')),
     ] + cmdutil.walkopts + cmdutil.commitopts + cmdutil.commitopts2,
     _('[OPTION]... [FILE]...'),
     inferrepo=True)