Mercurial > hg-stable
changeset 41411:7e55ca658e4b
dagop: check if stopdepth is greater than or equal to maxlogdepth
Might prevent off-by-one errors.
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Sat, 26 Jan 2019 12:24:04 +0800 |
parents | ee7791f2515b |
children | 91ec3d9a97f2 |
files | mercurial/dagop.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/dagop.py Sat Jan 26 12:21:20 2019 +0800 +++ b/mercurial/dagop.py Sat Jan 26 12:24:04 2019 +0800 @@ -221,7 +221,7 @@ Scan ends at the stopdepth (exlusive) if specified. Revisions found earlier than the startdepth are omitted. """ - if startdepth is None and (stopdepth is None or stopdepth == maxlogdepth): + if startdepth is None and (stopdepth is None or stopdepth >= maxlogdepth): gen = _genrevdescendants(repo, revs, followfirst) else: gen = _genrevdescendantsofdepth(repo, revs, followfirst,