Mercurial > hg
view CONTRIBUTING @ 32903:27932a76a88d
dagop: split module hosting DAG-related algorithms from revset
This module hosts the following functions. They are somewhat similar (e.g.
scanning revisions using heap queue or stack) and seem non-trivial in
algorithmic point of view.
- _revancestors()
- _revdescendants()
- reachableroots()
- _toposort()
I was thinking of adding revset._fileancestors() generator for better follow()
implementation, but it would be called from context.py as well. So I decided
to create new module.
Naming is hard. I couldn't come up with any better module name, so it's called
"dag operation" now. I rejected the following candidates:
- ancestor.py - existing, revlog-level DAG algorithm
- ancestorset.py - doesn't always return a set
- dagalgorithm.py - hard to type
- dagutil.py - existing
- revancestor.py - I want to add fileancestors()
% wc -l mercurial/dagop.py mercurial/revset.py
339 mercurial/dagop.py
2020 mercurial/revset.py
2359 total
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 16 Oct 2016 18:03:24 +0900 |
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).