mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 16:31:02 +03:00
_makelogrevset: replace try/except with 'next' usage
More readable without the 'except StopIteration' abomination.
This commit is contained in:
parent
b06100dbed
commit
f794990267
@ -1933,10 +1933,7 @@ def _makelogrevset(repo, pats, opts, revs):
|
|||||||
# --follow with FILE behaviour depends on revs...
|
# --follow with FILE behaviour depends on revs...
|
||||||
it = iter(revs)
|
it = iter(revs)
|
||||||
startrev = it.next()
|
startrev = it.next()
|
||||||
try:
|
followdescendants = startrev < next(it, startrev)
|
||||||
followdescendants = startrev < it.next()
|
|
||||||
except (StopIteration):
|
|
||||||
followdescendants = False
|
|
||||||
|
|
||||||
# branch and only_branch are really aliases and must be handled at
|
# branch and only_branch are really aliases and must be handled at
|
||||||
# the same time
|
# the same time
|
||||||
|
Loading…
Reference in New Issue
Block a user