--- a/hgext3rd/evolve/evocommands.py Tue Jul 11 11:12:23 2017 +0200
+++ b/hgext3rd/evolve/evocommands.py Tue Jul 11 11:58:07 2017 +0200
@@ -116,7 +116,7 @@
touched.update(files)
return touched
-def _commitfiltered(repo, ctx, match, target=None):
+def _commitfiltered(repo, ctx, match, target=None, message=None):
"""Recommit ctx with changed files not in match. Return the new
node identifier, or None if nothing changed.
"""
@@ -156,9 +156,11 @@
copied=copied.get(path))
return mctx
+ if message is None:
+ message = ctx.description()
new = context.memctx(repo,
parents=[base.node(), node.nullid],
- text=ctx.description(),
+ text=message,
files=files,
filectxfn=filectxfn,
user=ctx.user(),
@@ -216,7 +218,7 @@
'^uncommit',
[('a', 'all', None, _('uncommit all changes when no arguments given')),
('r', 'rev', '', _('revert commit content to REV instead')),
- ] + commands.walkopts,
+ ] + commands.walkopts + commitopts,
_('[OPTION]... [NAME]'))
def uncommit(ui, repo, *pats, **opts):
"""move changes from parent revision to working directory
@@ -272,7 +274,11 @@
includeorexclude = opts.get('include') or opts.get('exclude')
if (pats or includeorexclude or opts.get('all')):
match = scmutil.match(old, pats, opts)
- newid = _commitfiltered(repo, old, match, target=rev)
+ if not (opts['message'] or opts['logfile']):
+ opts['message'] = old.description()
+ message = cmdutil.logmessage(ui, opts)
+ newid = _commitfiltered(repo, old, match, target=rev,
+ message=message)
if newid is None:
raise error.Abort(_('nothing to uncommit'),
hint=_("use --all to uncommit all files"))