Commit c3b2f67a authored by Thomas Arendsen Hein's avatar Thomas Arendsen Hein
Browse files

Make annotate --follow an alias for -f/--file to behave like in older versions

Since 98a0421b9e52 annotate follows copies/renames by default, but the output
of e.g. "annotate --follow --number" should not change without some
deprecation time.

--HG--
branch : stable
parent d5bd1beff794
......@@ -99,6 +99,11 @@ def annotate(ui, repo, *pats, **opts):
anyway, although the results will probably be neither useful
nor desirable.
"""
if opts.get('follow'):
# --follow is deprecated and now just an alias for -f/--file
# to mimic the behavior of Mercurial before version 1.5
opts['file'] = 1
datefunc = ui.quiet and util.shortdate or util.datestr
getdate = util.cachefunc(lambda x: datefunc(x[0].date()))
......@@ -3422,7 +3427,8 @@ table = {
"^annotate|blame":
(annotate,
[('r', 'rev', '', _('annotate the specified revision')),
('', 'follow', None, _('follow copies and renames (DEPRECATED)')),
('', 'follow', None,
_('follow copies/renames and list the filename (DEPRECATED)')),
('', 'no-follow', None, _("don't follow copies and renames")),
('a', 'text', None, _('treat all files as text')),
('u', 'user', None, _('list the author (long with -v)')),
......
......@@ -102,4 +102,4 @@ merging b
1:3: a
% generate ABA rename configuration
% annotate after ABA with follow
8: foo
foo: foo
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment