mirror of
https://github.com/facebook/sapling.git
synced 2024-10-06 23:07:18 +03:00
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:
parent
11540756a2
commit
c6929b7a7e
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user