ancestor: use absolute_import

A few months ago, import-checker.py was taught to enforce a more
well-defined import style for files with absolute_import. However,
we stopped short of actually converting source files to use
absolute_import because of problems with certain files.

Investigation revealed the following problems with switching to
absolute_import universally:

1) import cycles result in import failure on Python 2.6
2) undetermined way to import C/pure modules

While these problems need to be solved, they can be put off.
This patch starts a series of converting files to absolute_import
that won't exhibit any of the aforementioned problems.
This commit is contained in:
Gregory Szorc 2015-08-07 19:45:48 -07:00
parent 11540756a2
commit c6929b7a7e

View File

@ -5,9 +5,12 @@
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
from __future__ import absolute_import
import collections
import heapq
from node import nullrev
from .node import nullrev
def commonancestorsheads(pfunc, *nodes):
"""Returns a set with the heads of all common ancestors of all nodes,