comparison mercurial/commands.py @ 10579:f142fa3c0a8c stable

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.
author Thomas Arendsen Hein <thomas@intevation.de>
date Wed, 03 Mar 2010 22:04:59 +0100
parents 6ded6243bde2
children 7648f32713f2
comparison
equal deleted inserted replaced
10577:d5bd1beff794 10579:f142fa3c0a8c
97 Without the -a/--text option, annotate will avoid processing files 97 Without the -a/--text option, annotate will avoid processing files
98 it detects as binary. With -a, annotate will annotate the file 98 it detects as binary. With -a, annotate will annotate the file
99 anyway, although the results will probably be neither useful 99 anyway, although the results will probably be neither useful
100 nor desirable. 100 nor desirable.
101 """ 101 """
102 if opts.get('follow'):
103 # --follow is deprecated and now just an alias for -f/--file
104 # to mimic the behavior of Mercurial before version 1.5
105 opts['file'] = 1
106
102 datefunc = ui.quiet and util.shortdate or util.datestr 107 datefunc = ui.quiet and util.shortdate or util.datestr
103 getdate = util.cachefunc(lambda x: datefunc(x[0].date())) 108 getdate = util.cachefunc(lambda x: datefunc(x[0].date()))
104 109
105 if not pats: 110 if not pats:
106 raise util.Abort(_('at least one filename or pattern is required')) 111 raise util.Abort(_('at least one filename or pattern is required'))
3420 (addremove, similarityopts + walkopts + dryrunopts, 3425 (addremove, similarityopts + walkopts + dryrunopts,
3421 _('[OPTION]... [FILE]...')), 3426 _('[OPTION]... [FILE]...')),
3422 "^annotate|blame": 3427 "^annotate|blame":
3423 (annotate, 3428 (annotate,
3424 [('r', 'rev', '', _('annotate the specified revision')), 3429 [('r', 'rev', '', _('annotate the specified revision')),
3425 ('', 'follow', None, _('follow copies and renames (DEPRECATED)')), 3430 ('', 'follow', None,
3431 _('follow copies/renames and list the filename (DEPRECATED)')),
3426 ('', 'no-follow', None, _("don't follow copies and renames")), 3432 ('', 'no-follow', None, _("don't follow copies and renames")),
3427 ('a', 'text', None, _('treat all files as text')), 3433 ('a', 'text', None, _('treat all files as text')),
3428 ('u', 'user', None, _('list the author (long with -v)')), 3434 ('u', 'user', None, _('list the author (long with -v)')),
3429 ('f', 'file', None, _('list the filename')), 3435 ('f', 'file', None, _('list the filename')),
3430 ('d', 'date', None, _('list the date (short with -q)')), 3436 ('d', 'date', None, _('list the date (short with -q)')),