[PATCH] dagop: make stopdepth in _genrevancestors() match revset arg

Martin von Zweigbergk martinvonz at google.com
Sat Jun 24 00:47:50 EDT 2017


On Fri, Jun 23, 2017 at 8:23 PM, Yuya Nishihara <yuya at tcha.org> wrote:
> On Fri, 23 Jun 2017 11:39:37 -0700, Martin von Zweigbergk wrote:
>> # HG changeset patch
>> # User Martin von Zweigbergk <martinvonz at google.com>
>> # Date 1498241757 25200
>> #      Fri Jun 23 11:15:57 2017 -0700
>> # Node ID ba913ce1b38584554a62ba3d765d124c284e7e0d
>> # Parent  f63d111258dab8375322483888a44bf9be6c4673
>> dagop: make stopdepth in _genrevancestors() match revset arg
>>
>> I was confused for a while that stopdepth was exclusive in dagop.py
>> but not in the ancestors() revset.
>
> We generally use half-open range for internal stuff (e.g. revlog.revs(),
> smartset.spanset), so I made stopdepth an exclusive boundary.

Fair enough.

>
>> Let's also raise an exception if stopdepth<0, since revset.py already
>> checks that.
>
> This seems good.

I'll send a patch for only that part.


More information about the Mercurial-devel mailing list