Yuya Nishihara <y...@tcha.org> writes:

> On Tue, 26 Jun 2018 15:40:38 -0700, Sean Farley wrote:
>> # HG changeset patch
>> # User Sean Farley <s...@farley.io>
>> # Date 1530051981 25200
>> #      Tue Jun 26 15:26:21 2018 -0700
>> # Branch gca-revset
>> # Node ID 0bab83973dbaecf03167801ddc4550c4b8b581f1
>> # Parent  33336034db436af9b15237bb87f82405eb039dfb
>> revset: add optimization for heads(commonancestors())
>
>> +from .ancestor import commonancestorsheads
>
> symbol import isn't allowed.

Argh, a bad habit I picked up from other python projects.

>> +# for internal use
>> +@predicate('_commonancestorheads(set)', safe=True)
>> +def _commonancestorheads(repo, subset, x):
>> +    """Returns all greatest common ancestors of the changesets.
>> +
>> +    This is an internal method is for quickly calculating "heads(::x and 
>> ::y)"
>> +
>> +    These greatest common ancestors are the same ones that the consesus bid
>> +    merge will find.
>> +    """
>
> This has to be a comment. All docstrings are visible in the revset help.

Oops.

>> +    h = heads(repo, subset, x)
>                        ^^^^^^
>                        fullreposet(repo)
>
> heads may be out of the subset.

Yeah, agreed.

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to