# HG changeset patch # User Martin von Zweigbergk # Date 2017-06-24 05:15:22 # Node ID a10f5f6771f67ac560e589c6a841fbebd573ca3d # Parent ce96efec81121eab1c8ee3ff223a924530322400 dagop: raise ProgrammingError if stopdepth < 0 revset.py should never send such a value. diff --git a/mercurial/dagop.py b/mercurial/dagop.py --- a/mercurial/dagop.py +++ b/mercurial/dagop.py @@ -32,8 +32,10 @@ def _genrevancestors(repo, revs, followf startdepth = 0 if stopdepth is None: stopdepth = _maxlogdepth - if stopdepth <= 0: + if stopdepth == 0: return + if stopdepth < 0: + raise error.ProgrammingError('negative stopdepth') cl = repo.changelog