##// END OF EJS Templates
convert: allow the converter_source to say "skip this revision"...
Alexis S. L. Carvalho -
r5374:e7108742 default
parent child Browse files
Show More
@@ -5,7 +5,7 b''
5 5 # This software may be used and distributed according to the terms
6 6 # of the GNU General Public License, incorporated herein by reference.
7 7
8 from common import NoRepo, converter_source, converter_sink
8 from common import NoRepo, SKIPREV, converter_source, converter_sink
9 9 from cvs import convert_cvs
10 10 from darcs import darcs_source
11 11 from git import convert_git
@@ -202,7 +202,15 b' class converter(object):'
202 202 do_copies = hasattr(self.dest, 'copyfile')
203 203 filenames = []
204 204
205 files, copies = self.source.getchanges(rev)
205 changes = self.source.getchanges(rev)
206 if isinstance(changes, basestring):
207 if changes == SKIPREV:
208 dest = SKIPREV
209 else:
210 dest = self.map[changes]
211 self.mapentry(rev, dest)
212 return
213 files, copies = changes
206 214 parents = [self.map[r] for r in commit.parents]
207 215 if commit.parents:
208 216 prev = commit.parents[0]
@@ -263,7 +271,7 b' class converter(object):'
263 271 ctags = {}
264 272 for k in tags:
265 273 v = tags[k]
266 if v in self.map:
274 if self.map.get(v, SKIPREV) != SKIPREV:
267 275 ctags[k] = self.map[v]
268 276
269 277 if c and ctags:
@@ -17,6 +17,8 b' def decodeargs(s):'
17 17
18 18 class NoRepo(Exception): pass
19 19
20 SKIPREV = 'hg-convert-skipped-revision'
21
20 22 class commit(object):
21 23 def __init__(self, author, date, desc, parents, branch=None, rev=None):
22 24 self.author = author
General Comments 0
You need to be logged in to leave comments. Login now