2516 |
2516 |
2517 If --stat or --patch is not passed, filematcher is None. Otherwise it |
2517 If --stat or --patch is not passed, filematcher is None. Otherwise it |
2518 is a callable taking a revision number and returning a match objects |
2518 is a callable taking a revision number and returning a match objects |
2519 filtering the files to be detailed when displaying the revision. |
2519 filtering the files to be detailed when displaying the revision. |
2520 """ |
2520 """ |
|
2521 follow = opts.get('follow') or opts.get('follow_first') |
|
2522 followfirst = opts.get('follow_first') |
|
2523 if opts.get('rev'): |
|
2524 # TODO: do not mutate opts here |
|
2525 opts.pop('follow', None) |
|
2526 opts.pop('follow_first', None) |
2521 limit = loglimit(opts) |
2527 limit = loglimit(opts) |
2522 revs = _logrevs(repo, opts) |
2528 revs = _logrevs(repo, opts) |
2523 if not revs: |
2529 if not revs: |
2524 return smartset.baseset(), None |
2530 return smartset.baseset(), None |
|
2531 if opts.get('rev') and follow: |
|
2532 revs = dagop.revancestors(repo, revs, followfirst=followfirst) |
|
2533 revs.reverse() |
2525 expr, filematcher = _makelogrevset(repo, pats, opts) |
2534 expr, filematcher = _makelogrevset(repo, pats, opts) |
2526 if opts.get('graph') and opts.get('rev'): |
2535 if opts.get('graph') and opts.get('rev'): |
2527 # User-specified revs might be unsorted, but don't sort before |
2536 # User-specified revs might be unsorted, but don't sort before |
2528 # _makelogrevset because it might depend on the order of revs |
2537 # _makelogrevset because it might depend on the order of revs |
2529 if not (revs.isdescending() or revs.istopo()): |
2538 if not (revs.isdescending() or revs.istopo()): |