equal
deleted
inserted
replaced
318 if opts.get('follow'): |
318 if opts.get('follow'): |
319 # --follow is deprecated and now just an alias for -f/--file |
319 # --follow is deprecated and now just an alias for -f/--file |
320 # to mimic the behavior of Mercurial before version 1.5 |
320 # to mimic the behavior of Mercurial before version 1.5 |
321 opts['file'] = True |
321 opts['file'] = True |
322 |
322 |
|
323 if (not opts.get('user') and not opts.get('changeset') |
|
324 and not opts.get('date') and not opts.get('file')): |
|
325 opts['number'] = True |
|
326 |
|
327 linenumber = opts.get('line_number') is not None |
|
328 if linenumber and (not opts.get('changeset')) and (not opts.get('number')): |
|
329 raise error.Abort(_('at least one of -n/-c is required for -l')) |
|
330 |
323 rev = opts.get('rev') |
331 rev = opts.get('rev') |
324 if rev: |
332 if rev: |
325 repo = scmutil.unhidehashlikerevs(repo, [rev], 'nowarn') |
333 repo = scmutil.unhidehashlikerevs(repo, [rev], 'nowarn') |
326 ctx = scmutil.revsingle(repo, rev) |
334 ctx = scmutil.revsingle(repo, rev) |
327 |
335 |
370 'rev': 'number', |
378 'rev': 'number', |
371 'node': 'changeset', |
379 'node': 'changeset', |
372 'path': 'file', |
380 'path': 'file', |
373 'lineno': 'line_number', |
381 'lineno': 'line_number', |
374 } |
382 } |
375 |
|
376 if (not opts.get('user') and not opts.get('changeset') |
|
377 and not opts.get('date') and not opts.get('file')): |
|
378 opts['number'] = True |
|
379 |
|
380 linenumber = opts.get('line_number') is not None |
|
381 if linenumber and (not opts.get('changeset')) and (not opts.get('number')): |
|
382 raise error.Abort(_('at least one of -n/-c is required for -l')) |
|
383 |
383 |
384 ui.pager('annotate') |
384 ui.pager('annotate') |
385 |
385 |
386 if rootfm.isplain(): |
386 if rootfm.isplain(): |
387 def makefunc(get, fmt): |
387 def makefunc(get, fmt): |