[PATCH 1 of 4] revert: add a message to noop action
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Mon Aug 18 23:36:50 UTC 2014
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1407010021 25200
# Sat Aug 02 13:07:01 2014 -0700
# Node ID 8fd7b8a721f0fa8b35f02354b643bfc73c6f0524
# Parent 66e2897ab70fa5a2d7ff58aa8c93419294045244
revert: add a message to noop action
This prepare the arrival of a second "not touching file" action: revert on
untracked file.
diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -2468,11 +2468,11 @@ def revert(ui, repo, ctx, parents, *pats
# (<list of file>, message>) tuple
actions = {'revert': ([], _('reverting %s\n')),
'add': ([], _('adding %s\n')),
'remove': ([], removeforget),
'undelete': ([], _('undeleting %s\n')),
- 'noop': (None, None),
+ 'noop': (None, _('no changes needed to %s\n')),
}
# should we do a backup ?
backup = not opts.get('no_backup')
@@ -2512,11 +2512,11 @@ def revert(ui, repo, ctx, parents, *pats
if ui.verbose or not exact:
if not isinstance(msg, basestring):
msg = msg(abs)
ui.status(msg % rel)
elif exact:
- ui.warn(_('no changes needed to %s\n') % rel)
+ ui.warn(msg % rel)
break
else:
# Not touched in current dirstate.
# file is unknown in parent, restore older version or ignore.
More information about the Mercurial-devel
mailing list