--- a/hgext3rd/evolve/cmdrewrite.py Fri Nov 17 03:14:20 2017 +0530
+++ b/hgext3rd/evolve/cmdrewrite.py Fri Nov 17 03:14:31 2017 +0530
@@ -300,6 +300,7 @@
[('a', 'all', None, _('uncommit all changes when no arguments given')),
('i', 'interactive', False, _('interactive mode to uncommit (EXPERIMENTAL)')),
('r', 'rev', '', _('revert commit content to REV instead')),
+ ('n', 'note', '', _('store a note on uncommit')),
] + commands.walkopts + commitopts + commitopts2 + commitopts3,
_('[OPTION]... [NAME]'))
def uncommit(ui, repo, *pats, **opts):
@@ -325,6 +326,7 @@
Return 0 if changed files are uncommitted.
"""
+ _checknotesize(opts)
_resolveoptions(ui, opts) # process commitopts3
interactive = opts.get('interactive')
wlock = lock = tr = None
@@ -377,7 +379,12 @@
raise error.Abort(_('nothing to uncommit'),
hint=_("use --all to uncommit all files"))
- obsolete.createmarkers(repo, [(old, (repo[newid],))])
+ # metadata to be stored in obsmarker
+ metadata = {}
+ if opts.get('note'):
+ metadata['note'] = opts['note']
+
+ obsolete.createmarkers(repo, [(old, (repo[newid],))], metadata=metadata)
phases.retractboundary(repo, tr, oldphase, [newid])
with repo.dirstate.parentchange():
repo.dirstate.setparents(newid, node.nullid)