Mercurial > hg
comparison hgext/convert/filemap.py @ 28367:58b176240df6
convert: filemap use absolute_import
author | timeless <timeless@mozdev.org> |
---|---|
date | Wed, 02 Mar 2016 09:00:58 +0000 |
parents | 56b2bcea2529 |
children | a0939666b836 |
comparison
equal
deleted
inserted
replaced
28366:4e08b91a483f | 28367:58b176240df6 |
---|---|
1 # Copyright 2007 Bryan O'Sullivan <bos@serpentine.com> | 1 # Copyright 2007 Bryan O'Sullivan <bos@serpentine.com> |
2 # Copyright 2007 Alexis S. L. Carvalho <alexis@cecm.usp.br> | 2 # Copyright 2007 Alexis S. L. Carvalho <alexis@cecm.usp.br> |
3 # | 3 # |
4 # This software may be used and distributed according to the terms of the | 4 # This software may be used and distributed according to the terms of the |
5 # GNU General Public License version 2 or any later version. | 5 # GNU General Public License version 2 or any later version. |
6 from __future__ import absolute_import | |
6 | 7 |
7 import posixpath | 8 import posixpath |
8 import shlex | 9 import shlex |
10 from mercurial import ( | |
11 error, | |
12 ) | |
9 from mercurial.i18n import _ | 13 from mercurial.i18n import _ |
10 from mercurial import error | 14 from . import common |
11 from common import SKIPREV, converter_source | 15 SKIPREV = common.SKIPREV |
12 | 16 |
13 def rpairs(path): | 17 def rpairs(path): |
14 '''Yield tuples with path split at '/', starting with the full path. | 18 '''Yield tuples with path split at '/', starting with the full path. |
15 No leading, trailing or double '/', please. | 19 No leading, trailing or double '/', please. |
16 >>> for x in rpairs('foo/bar/baz'): print x | 20 >>> for x in rpairs('foo/bar/baz'): print x |
162 # | 166 # |
163 # This set of revisions includes not only revisions that directly | 167 # This set of revisions includes not only revisions that directly |
164 # touch files we're interested in, but also merges that merge two | 168 # touch files we're interested in, but also merges that merge two |
165 # or more interesting revisions. | 169 # or more interesting revisions. |
166 | 170 |
167 class filemap_source(converter_source): | 171 class filemap_source(common.converter_source): |
168 def __init__(self, ui, baseconverter, filemap): | 172 def __init__(self, ui, baseconverter, filemap): |
169 super(filemap_source, self).__init__(ui) | 173 super(filemap_source, self).__init__(ui) |
170 self.base = baseconverter | 174 self.base = baseconverter |
171 self.filemapper = filemapper(ui, filemap) | 175 self.filemapper = filemapper(ui, filemap) |
172 self.commits = {} | 176 self.commits = {} |