Commits

Pierre-Yves David committed 892a6d7

amend: drop the deprecated note option

We plan to get closer to the commit --amend implementation dropping this
deprecated option helps.

  • Participants
  • Parent commits eeaacbb
  • Branches default

Comments (0)

Files changed (2)

File hgext/evolve.py

 @command('amend|refresh',
     [('A', 'addremove', None,
      _('mark new/missing files as added/removed before committing')),
-    ('n', 'note', '', _('use text as commit message for this update (DEPRECATED)')),
     ('e', 'edit', False, _('invoke editor on commit messages')),
     ] + walkopts + commitopts + commitopts2,
     _('[OPTION]... [FILE]...'))
                 ciopts = dict(opts)
                 ciopts.pop('message', None)
                 ciopts.pop('logfile', None)
-                ciopts['message'] = opts.get('note') or ('amends %s' % old.hex())
+                ciopts['message'] = 'amends %s' % old.hex()
                 e = cmdutil.commiteditor
                 def commitfunc(ui, repo, message, match, opts):
                     return repo.commit(message, opts.get('user'), opts.get('date'),

File tests/test-evolve.t

 
 and **amend**::
 
-  $ hg amend --note "fix spelling of Zwei"
+  $ hg amend
 
-The `--note` is our commit message for the *update* only. So its only purpose
-is to document the evolution of the changeset. If we use `--message` with
-`amend`, it replaces the commit message of the changeset itself.
 
 This results in a new single changeset for our amended changeset, and the old
 changeset plus the updating changeset are hidden from view by default::
 
 (amend of on ancestors)
 
-  $ hg amend --note 'french looks better'
+  $ hg amend
   1 new unstable changesets
   $ hg log
   6	feature-A: a nifty feature - test
   $ glog --hidden
   o  6:23409eba69a0@default(draft) a nifty feature
   |
-  | x  5:e416e48b2742@default(draft) french looks better
+  | x  5:1c85604a32e4@default(draft) amends 568a468b60fc99a42d5d4ddbe181caff1eef308d
   | |
   | | o  4:f8111a076f09@default(draft) another feature
   | |/
-  | | x  3:524e478d4811@default(draft) fix spelling of Zwei
+  | | x  3:80ebe8e4ea86@default(draft) amends 7b36850622b2fd159fa30a4fb2a1edd2043b4a14
   | | |
   | | x  2:7b36850622b2@default(draft) another feature
   | |/
   
   $ hg debugobsolete
   7b36850622b2fd159fa30a4fb2a1edd2043b4a14 f8111a076f0975cbecb336e2bd3411be22b673fb 0 {'date': '* *', 'user': 'test'} (glob)
-  524e478d4811d405c8771e4c441de4483bdf8b33 0 {'date': '* *', 'user': 'test'} (glob)
+  80ebe8e4ea869802d88c96622bed8ad34aff9d37 0 {'date': '* *', 'user': 'test'} (glob)
   568a468b60fc99a42d5d4ddbe181caff1eef308d 23409eba69a0986e90cd42252852c1e6da97af5b 0 {'date': '* *', 'user': 'test'} (glob)
-  e416e48b27428695d00c2a2cc4a0b9619482e63f 0 {'date': '* *', 'user': 'test'} (glob)
+  1c85604a32e4fec7b2d804c6f8cbaf4de9925ee3 0 {'date': '* *', 'user': 'test'} (glob)
   $ hg evolve
   move:[4] another feature
   atop:[6] a nifty feature