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...
|
||||
it = iter(revs)
|
||||
startrev = it.next()
|
||||
try:
|
||||
followdescendants = startrev < it.next()
|
||||
except (StopIteration):
|
||||
followdescendants = False
|
||||
followdescendants = startrev < next(it, startrev)
|
||||
|
||||
# branch and only_branch are really aliases and must be handled at
|
||||
# the same time
|
||||
|
Loading…
Reference in New Issue
Block a user