Show More
@@ -2505,17 +2505,16 b' def _logrevs(repo, opts):' | |||
|
2505 | 2505 | return revs |
|
2506 | 2506 | |
|
2507 | 2507 | def getlogrevs(repo, pats, opts): |
|
2508 |
"""Return (revs, |
|
|
2509 | revision numbers, expr is a revset string built from log options | |
|
2510 | and file patterns or None, and used to filter 'revs'. If --stat or | |
|
2511 | --patch are not passed filematcher is None. Otherwise it is a | |
|
2512 | callable taking a revision number and returning a match objects | |
|
2508 | """Return (revs, filematcher) where revs is a smartset | |
|
2509 | ||
|
2510 | If --stat or --patch is not passed, filematcher is None. Otherwise it | |
|
2511 | is a callable taking a revision number and returning a match objects | |
|
2513 | 2512 | filtering the files to be detailed when displaying the revision. |
|
2514 | 2513 | """ |
|
2515 | 2514 | limit = loglimit(opts) |
|
2516 | 2515 | revs = _logrevs(repo, opts) |
|
2517 | 2516 | if not revs: |
|
2518 |
return smartset.baseset(), None |
|
|
2517 | return smartset.baseset(), None | |
|
2519 | 2518 | expr, filematcher = _makelogrevset(repo, pats, opts, revs) |
|
2520 | 2519 | if opts.get('graph') and opts.get('rev'): |
|
2521 | 2520 | # User-specified revs might be unsorted, but don't sort before |
@@ -2527,7 +2526,7 b' def getlogrevs(repo, pats, opts):' | |||
|
2527 | 2526 | revs = matcher(repo, revs) |
|
2528 | 2527 | if limit is not None: |
|
2529 | 2528 | revs = revs.slice(0, limit) |
|
2530 |
return revs, |
|
|
2529 | return revs, filematcher | |
|
2531 | 2530 | |
|
2532 | 2531 | def _parselinerangelogopt(repo, opts): |
|
2533 | 2532 | """Parse --line-range log option and return a list of tuples (filename, |
@@ -3410,7 +3410,7 b' def log(ui, repo, *pats, **opts):' | |||
|
3410 | 3410 | del opts['follow'] |
|
3411 | 3411 | |
|
3412 | 3412 | repo = scmutil.unhidehashlikerevs(repo, opts.get('rev'), 'nowarn') |
|
3413 |
revs |
|
|
3413 | revs, filematcher = cmdutil.getlogrevs(repo, pats, opts) | |
|
3414 | 3414 | hunksfilter = None |
|
3415 | 3415 | |
|
3416 | 3416 | if opts.get('graph'): |
@@ -90,10 +90,16 b' o (0) root' | |||
|
90 | 90 | > revsetlang, |
|
91 | 91 | > ) |
|
92 | 92 | > |
|
93 | > def logrevset(repo, pats, opts): | |
|
94 | > revs = cmdutil._logrevs(repo, opts) | |
|
95 | > if not revs: | |
|
96 | > return None | |
|
97 | > return cmdutil._makelogrevset(repo, pats, opts, revs)[0] | |
|
98 | > | |
|
93 | 99 | > def uisetup(ui): |
|
94 | 100 | > def printrevset(orig, ui, repo, *pats, **opts): |
|
95 | 101 | > if opts.get('print_revset'): |
|
96 |
> expr = |
|
|
102 | > expr = logrevset(repo, pats, opts) | |
|
97 | 103 | > if expr: |
|
98 | 104 | > tree = revsetlang.parse(expr) |
|
99 | 105 | > else: |
General Comments 0
You need to be logged in to leave comments.
Login now