Show More
@@ -20,13 +20,15 b' class NoRepo(Exception): pass' | |||
|
20 | 20 | SKIPREV = 'SKIP' |
|
21 | 21 | |
|
22 | 22 | class commit(object): |
|
23 |
def __init__(self, author, date, desc, parents, branch=None, rev=None |
|
|
23 | def __init__(self, author, date, desc, parents, branch=None, rev=None, | |
|
24 | extra={}): | |
|
24 | 25 | self.author = author |
|
25 | 26 | self.date = date |
|
26 | 27 | self.desc = desc |
|
27 | 28 | self.parents = parents |
|
28 | 29 | self.branch = branch |
|
29 | 30 | self.rev = rev |
|
31 | self.extra = extra | |
|
30 | 32 | |
|
31 | 33 | class converter_source(object): |
|
32 | 34 | """Conversion source interface""" |
@@ -108,7 +108,7 b' class mercurial_sink(converter_sink):' | |||
|
108 | 108 | p2 = parents.pop(0) |
|
109 | 109 | |
|
110 | 110 | text = commit.desc |
|
111 |
extra = |
|
|
111 | extra = commit.extra.copy() | |
|
112 | 112 | if self.branchnames and commit.branch: |
|
113 | 113 | extra['branch'] = commit.branch |
|
114 | 114 | if commit.rev: |
@@ -230,7 +230,7 b' class mercurial_source(converter_source)' | |||
|
230 | 230 | parents = [hex(p.node()) for p in ctx.parents() if p.node() != nullid] |
|
231 | 231 | return commit(author=ctx.user(), date=util.datestr(ctx.date()), |
|
232 | 232 | desc=ctx.description(), parents=parents, |
|
233 | branch=ctx.branch()) | |
|
233 | branch=ctx.branch(), extra=ctx.extra()) | |
|
234 | 234 | |
|
235 | 235 | def gettags(self): |
|
236 | 236 | tags = [t for t in self.repo.tagslist() if t[0] != 'tip'] |
@@ -82,6 +82,7 b' class changectx(object):' | |||
|
82 | 82 | def files(self): return self._changeset[3] |
|
83 | 83 | def description(self): return self._changeset[4] |
|
84 | 84 | def branch(self): return self._changeset[5].get("branch") |
|
85 | def extra(self): return self._changeset[5] | |
|
85 | 86 | def tags(self): return self._repo.nodetags(self._node) |
|
86 | 87 | |
|
87 | 88 | def parents(self): |
General Comments 0
You need to be logged in to leave comments.
Login now