Show More
@@ -2558,8 +2558,8 b' def getgraphlogrevs(repo, pats, opts):' | |||||
2558 | if not (revs.isdescending() or revs.istopo()): |
|
2558 | if not (revs.isdescending() or revs.istopo()): | |
2559 | revs.sort(reverse=True) |
|
2559 | revs.sort(reverse=True) | |
2560 | if expr: |
|
2560 | if expr: | |
2561 |
matcher = revset.match(repo.ui, expr |
|
2561 | matcher = revset.match(repo.ui, expr) | |
2562 | revs = matcher(repo, revs) |
|
2562 | revs = matcher(repo, revs, order=revset.followorder) | |
2563 | if limit is not None: |
|
2563 | if limit is not None: | |
2564 | limitedrevs = [] |
|
2564 | limitedrevs = [] | |
2565 | for idx, rev in enumerate(revs): |
|
2565 | for idx, rev in enumerate(revs): | |
@@ -2584,8 +2584,8 b' def getlogrevs(repo, pats, opts):' | |||||
2584 | return smartset.baseset([]), None, None |
|
2584 | return smartset.baseset([]), None, None | |
2585 | expr, filematcher = _makelogrevset(repo, pats, opts, revs) |
|
2585 | expr, filematcher = _makelogrevset(repo, pats, opts, revs) | |
2586 | if expr: |
|
2586 | if expr: | |
2587 |
matcher = revset.match(repo.ui, expr |
|
2587 | matcher = revset.match(repo.ui, expr) | |
2588 | revs = matcher(repo, revs) |
|
2588 | revs = matcher(repo, revs, order=revset.followorder) | |
2589 | if limit is not None: |
|
2589 | if limit is not None: | |
2590 | limitedrevs = [] |
|
2590 | limitedrevs = [] | |
2591 | for idx, r in enumerate(revs): |
|
2591 | for idx, r in enumerate(revs): |
@@ -76,8 +76,8 b' fullreposet = smartset.fullreposet' | |||||
76 | # equivalent to 'follow' for them, and the resulting order is based on the |
|
76 | # equivalent to 'follow' for them, and the resulting order is based on the | |
77 | # 'subset' parameter passed down to them: |
|
77 | # 'subset' parameter passed down to them: | |
78 | # |
|
78 | # | |
79 |
# m = revset.match(... |
|
79 | # m = revset.match(...) | |
80 | # m(repo, subset) |
|
80 | # m(repo, subset, order=defineorder) | |
81 | # ^^^^^^ |
|
81 | # ^^^^^^ | |
82 | # For most revsets, 'define' means using the order this subset provides |
|
82 | # For most revsets, 'define' means using the order this subset provides | |
83 | # |
|
83 | # | |
@@ -2120,21 +2120,14 b' def posttreebuilthook(tree, repo):' | |||||
2120 | # hook for extensions to execute code on the optimized tree |
|
2120 | # hook for extensions to execute code on the optimized tree | |
2121 | pass |
|
2121 | pass | |
2122 |
|
2122 | |||
2123 |
def match(ui, spec, repo=None |
|
2123 | def match(ui, spec, repo=None): | |
2124 | """Create a matcher for a single revision spec |
|
2124 | """Create a matcher for a single revision spec""" | |
|
2125 | return matchany(ui, [spec], repo=repo) | |||
2125 |
|
2126 | |||
2126 | If order=followorder, a matcher takes the ordering specified by the input |
|
2127 | def matchany(ui, specs, repo=None, localalias=None): | |
2127 | set. |
|
|||
2128 | """ |
|
|||
2129 | return matchany(ui, [spec], repo=repo, order=order) |
|
|||
2130 |
|
||||
2131 | def matchany(ui, specs, repo=None, order=defineorder, localalias=None): |
|
|||
2132 | """Create a matcher that will include any revisions matching one of the |
|
2128 | """Create a matcher that will include any revisions matching one of the | |
2133 | given specs |
|
2129 | given specs | |
2134 |
|
2130 | |||
2135 | If order=followorder, a matcher takes the ordering specified by the input |
|
|||
2136 | set. |
|
|||
2137 |
|
||||
2138 | If localalias is not None, it is a dict {name: definitionstring}. It takes |
|
2131 | If localalias is not None, it is a dict {name: definitionstring}. It takes | |
2139 | precedence over [revsetalias] config section. |
|
2132 | precedence over [revsetalias] config section. | |
2140 | """ |
|
2133 | """ | |
@@ -2166,11 +2159,11 b' def matchany(ui, specs, repo=None, order' | |||||
2166 | tree = revsetlang.analyze(tree) |
|
2159 | tree = revsetlang.analyze(tree) | |
2167 | tree = revsetlang.optimize(tree) |
|
2160 | tree = revsetlang.optimize(tree) | |
2168 | posttreebuilthook(tree, repo) |
|
2161 | posttreebuilthook(tree, repo) | |
2169 |
return makematcher(tree |
|
2162 | return makematcher(tree) | |
2170 |
|
2163 | |||
2171 |
def makematcher(tree |
|
2164 | def makematcher(tree): | |
2172 | """Create a matcher from an evaluatable tree""" |
|
2165 | """Create a matcher from an evaluatable tree""" | |
2173 | def mfunc(repo, subset=None): |
|
2166 | def mfunc(repo, subset=None, order=defineorder): | |
2174 | if subset is None: |
|
2167 | if subset is None: | |
2175 | subset = fullreposet(repo) |
|
2168 | subset = fullreposet(repo) | |
2176 | return getset(repo, subset, tree, order) |
|
2169 | return getset(repo, subset, tree, order) |
General Comments 0
You need to be logged in to leave comments.
Login now