# HG changeset patch # User Roy Marples # Date 1611097201 0 # Node ID 2fc99e3479d9ec7222e80db1d69ec16071fc1ab3 # Parent 51664f5abc3ae06bad555171f098936cc3c676e3 python-fastimport: Import our own modules using relative pathing This allows python-fastimport to be embedded as vendor code within other modules. This patch has been accepted upstream. diff -r 51664f5abc3a -r 2fc99e3479d9 hgext3rd/fastimport/vendor/python_fastimport/commands.py --- a/hgext3rd/fastimport/vendor/python_fastimport/commands.py Tue Jan 19 22:57:27 2021 +0000 +++ b/hgext3rd/fastimport/vendor/python_fastimport/commands.py Tue Jan 19 23:00:01 2021 +0000 @@ -24,7 +24,7 @@ import stat import sys -from fastimport.helpers import ( +from .helpers import ( newobject as object, utf8_bytes_string, repr_bytes, diff -r 51664f5abc3a -r 2fc99e3479d9 hgext3rd/fastimport/vendor/python_fastimport/dates.py --- a/hgext3rd/fastimport/vendor/python_fastimport/dates.py Tue Jan 19 22:57:27 2021 +0000 +++ b/hgext3rd/fastimport/vendor/python_fastimport/dates.py Tue Jan 19 23:00:01 2021 +0000 @@ -24,7 +24,7 @@ """ import time -from fastimport import errors +from . import errors def parse_raw(s, lineno=0): diff -r 51664f5abc3a -r 2fc99e3479d9 hgext3rd/fastimport/vendor/python_fastimport/parser.py --- a/hgext3rd/fastimport/vendor/python_fastimport/parser.py Tue Jan 19 22:57:27 2021 +0000 +++ b/hgext3rd/fastimport/vendor/python_fastimport/parser.py Tue Jan 19 23:00:01 2021 +0000 @@ -164,12 +164,12 @@ import sys import codecs -from fastimport import ( +from . import ( commands, dates, errors, ) -from fastimport.helpers import ( +from .helpers import ( newobject as object, utf8_bytes_string, ) diff -r 51664f5abc3a -r 2fc99e3479d9 hgext3rd/fastimport/vendor/python_fastimport/processor.py --- a/hgext3rd/fastimport/vendor/python_fastimport/processor.py Tue Jan 19 22:57:27 2021 +0000 +++ b/hgext3rd/fastimport/vendor/python_fastimport/processor.py Tue Jan 19 23:00:01 2021 +0000 @@ -32,8 +32,8 @@ import sys import time -from fastimport import errors -from fastimport.helpers import newobject as object +from . import errors +from .helpers import newobject as object class ImportProcessor(object): diff -r 51664f5abc3a -r 2fc99e3479d9 hgext3rd/fastimport/vendor/python_fastimport/processors/filter_processor.py --- a/hgext3rd/fastimport/vendor/python_fastimport/processors/filter_processor.py Tue Jan 19 22:57:27 2021 +0000 +++ b/hgext3rd/fastimport/vendor/python_fastimport/processors/filter_processor.py Tue Jan 19 23:00:01 2021 +0000 @@ -14,7 +14,7 @@ # along with this program. If not, see . """Import processor that filters the input (and doesn't import).""" -from fastimport import ( +from .. import ( commands, helpers, processor, diff -r 51664f5abc3a -r 2fc99e3479d9 hgext3rd/fastimport/vendor/python_fastimport/processors/info_processor.py --- a/hgext3rd/fastimport/vendor/python_fastimport/processors/info_processor.py Tue Jan 19 22:57:27 2021 +0000 +++ b/hgext3rd/fastimport/vendor/python_fastimport/processors/info_processor.py Tue Jan 19 23:00:01 2021 +0000 @@ -18,16 +18,14 @@ from __future__ import absolute_import from .. import ( + commands, + processor, reftracker, ) from ..helpers import ( invert_dict, invert_dictset, ) -from fastimport import ( - commands, - processor, - ) import stat diff -r 51664f5abc3a -r 2fc99e3479d9 hgext3rd/fastimport/vendor/python_fastimport/processors/query_processor.py --- a/hgext3rd/fastimport/vendor/python_fastimport/processors/query_processor.py Tue Jan 19 22:57:27 2021 +0000 +++ b/hgext3rd/fastimport/vendor/python_fastimport/processors/query_processor.py Tue Jan 19 23:00:01 2021 +0000 @@ -17,7 +17,7 @@ from __future__ import print_function -from fastimport import ( +from .. import ( commands, processor, )