Mercurial > hg
comparison hgext/convert/common.py @ 25748:baea47cafe75
convert: add support for specifying multiple revs
Previously convert could only take one '--rev'. This change allows the user to
specify multiple --rev entries. For instance, this could allow converting
multiple branches (but not all branches) at once from git.
In this first patch, we disable support for this for all sources. Future
patches will enable it for select sources (like git).
author | Durham Goode <durham@fb.com> |
---|---|
date | Wed, 08 Jul 2015 10:27:43 -0700 |
parents | 328739ea70c3 |
children | 86598f4fe1cf |
comparison
equal
deleted
inserted
replaced
25747:5a15236f142a | 25748:baea47cafe75 |
---|---|
57 self.phase = phase | 57 self.phase = phase |
58 | 58 |
59 class converter_source(object): | 59 class converter_source(object): |
60 """Conversion source interface""" | 60 """Conversion source interface""" |
61 | 61 |
62 def __init__(self, ui, path=None, rev=None): | 62 def __init__(self, ui, path=None, revs=None): |
63 """Initialize conversion source (or raise NoRepo("message") | 63 """Initialize conversion source (or raise NoRepo("message") |
64 exception if path is not a valid repository)""" | 64 exception if path is not a valid repository)""" |
65 self.ui = ui | 65 self.ui = ui |
66 self.path = path | 66 self.path = path |
67 self.rev = rev | 67 self.revs = revs |
68 | 68 |
69 self.encoding = 'utf-8' | 69 self.encoding = 'utf-8' |
70 | 70 |
71 def checkhexformat(self, revstr, mapname='splicemap'): | 71 def checkhexformat(self, revstr, mapname='splicemap'): |
72 """ fails if revstr is not a 40 byte hex. mercurial and git both uses | 72 """ fails if revstr is not a 40 byte hex. mercurial and git both uses |