From patchwork Sat Jun 24 05:48:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: dagop: raise ProgrammingError if stopdepth<=0 From: via Mercurial-devel X-Patchwork-Id: 21662 Message-Id: To: mercurial-devel@mercurial-scm.org Date: Fri, 23 Jun 2017 22:48:23 -0700 # HG changeset patch # User Martin von Zweigbergk # Date 1498281322 25200 # Fri Jun 23 22:15:22 2017 -0700 # Node ID d654eefeefdd3df493fa777cbcfe423f17d9d500 # Parent fac9941bd542e3621082b157fb2f3aff09cfb1b7 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 @@ -33,7 +33,7 @@ if stopdepth is None: stopdepth = _maxlogdepth if stopdepth <= 0: - return + raise error.ProgrammingError('negative stopdepth') cl = repo.changelog