# HG changeset patch # User Thomas Arendsen Hein # Date 1267650299 -3600 # Node ID f142fa3c0a8c555109cec4ee6475bc1aa5d52fc5 # Parent d5bd1beff794461611bb37999a79bd110c88d008 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. diff -r d5bd1beff794 -r f142fa3c0a8c mercurial/commands.py --- a/mercurial/commands.py Wed Mar 03 14:50:35 2010 +0100 +++ b/mercurial/commands.py Wed Mar 03 22:04:59 2010 +0100 @@ -99,6 +99,11 @@ 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 @@ "^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)')), diff -r d5bd1beff794 -r f142fa3c0a8c tests/test-annotate.out --- a/tests/test-annotate.out Wed Mar 03 14:50:35 2010 +0100 +++ b/tests/test-annotate.out Wed Mar 03 22:04:59 2010 +0100 @@ -102,4 +102,4 @@ 1:3: a % generate ABA rename configuration % annotate after ABA with follow -8: foo +foo: foo