Show More
@@ -87,9 +87,10 b' def _revdescendants(repo, revs, followfi' | |||
|
87 | 87 | |
|
88 | 88 | return generatorset(iterate(), iterasc=True) |
|
89 | 89 | |
|
90 | def revsbetween(repo, roots, heads): | |
|
91 | """Return all paths between roots and heads, inclusive of both endpoint | |
|
92 | sets.""" | |
|
90 | def reachableroots(repo, roots, heads, includepath=False): | |
|
91 | """return (heads(::<roots> and ::<heads>)) | |
|
92 | ||
|
93 | If includepath is True, return (<roots>::<heads>).""" | |
|
93 | 94 | if not roots: |
|
94 | 95 | return baseset() |
|
95 | 96 | parentrevs = repo.changelog.parentrevs |
@@ -110,6 +111,8 b' def revsbetween(repo, roots, heads):' | |||
|
110 | 111 | rev = nextvisit() |
|
111 | 112 | if rev in roots: |
|
112 | 113 | reached(rev) |
|
114 | if not includepath: | |
|
115 | continue | |
|
113 | 116 | parents = parentrevs(rev) |
|
114 | 117 | seen[rev] = parents |
|
115 | 118 | for parent in parents: |
@@ -117,6 +120,8 b' def revsbetween(repo, roots, heads):' | |||
|
117 | 120 | dovisit(parent) |
|
118 | 121 | if not reachable: |
|
119 | 122 | return baseset() |
|
123 | if not includepath: | |
|
124 | return reachable | |
|
120 | 125 | for rev in sorted(seen): |
|
121 | 126 | for parent in seen[rev]: |
|
122 | 127 | if parent in reachable: |
@@ -406,7 +411,8 b' def rangeset(repo, subset, x, y):' | |||
|
406 | 411 | |
|
407 | 412 | def dagrange(repo, subset, x, y): |
|
408 | 413 | r = fullreposet(repo) |
|
409 |
xs = re |
|
|
414 | xs = reachableroots(repo, getset(repo, r, x), getset(repo, r, y), | |
|
415 | includepath=True) | |
|
410 | 416 | # XXX We should combine with subset first: 'subset & baseset(...)'. This is |
|
411 | 417 | # necessary to ensure we preserve the order in subset. |
|
412 | 418 | return xs & subset |
General Comments 0
You need to be logged in to leave comments.
Login now