Mercurial > public > mercurial-scm > hg
comparison mercurial/revset.py @ 24201:77ef059b3317
revset: drop unnecessary calls of getall() with empty argument
If x is None, getall(repo, subset, x) == subset.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 10 Jan 2015 16:41:36 +0900 |
parents | bb11081562d7 |
children | 2de9ee016425 |
comparison
equal
deleted
inserted
replaced
24200:8e1f1673aa9a | 24201:77ef059b3317 |
---|---|
744 is the same as passing all(). | 744 is the same as passing all(). |
745 """ | 745 """ |
746 if x is not None: | 746 if x is not None: |
747 sources = getset(repo, fullreposet(repo), x) | 747 sources = getset(repo, fullreposet(repo), x) |
748 else: | 748 else: |
749 sources = getall(repo, fullreposet(repo), x) | 749 sources = fullreposet(repo) |
750 | 750 |
751 dests = set() | 751 dests = set() |
752 | 752 |
753 # subset contains all of the possible destinations that can be returned, so | 753 # subset contains all of the possible destinations that can be returned, so |
754 # iterate over them and see if their source(s) were provided in the arg set. | 754 # iterate over them and see if their source(s) were provided in the arg set. |
1345 for the first operation is selected. | 1345 for the first operation is selected. |
1346 """ | 1346 """ |
1347 if x is not None: | 1347 if x is not None: |
1348 dests = getset(repo, fullreposet(repo), x) | 1348 dests = getset(repo, fullreposet(repo), x) |
1349 else: | 1349 else: |
1350 dests = getall(repo, fullreposet(repo), x) | 1350 dests = fullreposet(repo) |
1351 | 1351 |
1352 def _firstsrc(rev): | 1352 def _firstsrc(rev): |
1353 src = _getrevsource(repo, rev) | 1353 src = _getrevsource(repo, rev) |
1354 if src is None: | 1354 if src is None: |
1355 return None | 1355 return None |