Yuya Nishihara <yuya@tcha.org> [Sun, 16 Oct 2016 18:03:24 +0900] rev 32921
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
Sean Farley <sean@farley.io> [Thu, 15 Jun 2017 17:14:53 -0700] rev 32920
tests: protect tests involving git ext::sh with git-ext-sh
Sean Farley <sean@farley.io> [Thu, 15 Jun 2017 17:13:23 -0700] rev 32919
hghave: add has_git_range for testing if git understands ext::sh
Even on CentOS 7, git is at version 1.8. It seems git 1.9 is when
ext::sh was introduced so we a check for that. The way these functions
are written follows the same style and format for the way we check svn
and bzr versions.
Martin von Zweigbergk <martinvonz@google.com> [Sat, 17 Jun 2017 23:09:47 -0700] rev 32918
rebase: rewrite "x in y.children()" as "y in x.parents()"
children() is slow
Martin von Zweigbergk <martinvonz@google.com> [Sat, 17 Jun 2017 23:09:39 -0700] rev 32917
shelve: rewrite "x in y.children()" as "y in x.parents()"
children() is slow
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 17 Jun 2017 17:16:28 +0530] rev 32916
py3: use open() instead of file() constructor
The file() constructor has been removed in python 3.
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 17 Jun 2017 15:29:26 +0530] rev 32915
py3: convert keys of kwargs back to bytes using pycompat.byteskwargs()
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 17 Jun 2017 15:05:11 +0530] rev 32914
py3: use pycompat.strkwargs() to convert kwargs keys to str before passing
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 17 Jun 2017 14:53:25 +0530] rev 32913
py3: use '%d' instead of '%s' for integers
Python 3 does not let you use '%s' for integers.
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 17 Jun 2017 14:39:10 +0530] rev 32912
py3: pass the path in hg.repository() as bytes
This make test-ancestor.py pass on Python 3.