view CONTRIBUTING @ 39174:71d83b315778

setdiscovery: don't use dagutil for parent resolution _updatesample()'s one remaining use of revlogdag is for resolving the parents of a revision. In 2 cases, we actually resolve parents. In 1, we operate on the inverted DAG and resolve children. This commit teaches _updatesample() to receive an argument defining the function to resolve "parent" revisions. Call sites pass in changelog.parentrevs() or a wrapper around changelog.children() accordingly. The use of children() is semantically correct. But it is quadratic, since revlog.children() does a range scan over all revisions starting at its input and effectively calls parentrevs() to build up the list of children. So calling it repeatedly in a loop is a recipe for bad performance. I will be implementing something better in a subsequent commit. I wanted to get the porting off of dagutil done in a way that was simple and correct. Like other patches in this series, this change is potentially impacted but revlogdag's ignorance of filtered revisions. The new code is filtering aware, since changelog's revs() (used by children() will skip filtered revisions and therefore hidden children won't appear. This is potentially backwards incompatible. But no tests fail and I think this code should respect visibility. Differential Revision: https://phab.mercurial-scm.org/D4322
author Gregory Szorc <gregory.szorc@gmail.com>
date Fri, 17 Aug 2018 18:22:10 +0000
parents a492610a2fc1
children
line wrap: on
line source

Our full contribution guidelines are in our wiki, please see:

https://www.mercurial-scm.org/wiki/ContributingChanges

If you just want a checklist to follow, you can go straight to

https://www.mercurial-scm.org/wiki/ContributingChanges#Submission_checklist

If you can't run the entire testsuite for some reason (it can be
difficult on Windows), please at least run `contrib/check-code.py` on
any files you've modified and run `python contrib/check-commit` on any
commits you've made (for example, `python contrib/check-commit
273ce12ad8f1` will report some style violations on a very old commit).