##// END OF EJS Templates
convert: record the source revision in the changelog
Brendan Cully -
r4873:28b23b90 default
parent child Browse files
Show More
@@ -4,6 +4,9 b' class NoRepo(Exception): pass'
4
4
5 class commit(object):
5 class commit(object):
6 def __init__(self, **parts):
6 def __init__(self, **parts):
7 self.rev = None
8 self.branch = None
9
7 for x in "author date desc parents".split():
10 for x in "author date desc parents".split():
8 if not x in parts:
11 if not x in parts:
9 raise util.Abort("commit missing field %s" % x)
12 raise util.Abort("commit missing field %s" % x)
@@ -80,7 +80,8 b' class convert_git(converter_source):'
80 date = tm + " " + str(tz)
80 date = tm + " " + str(tz)
81 author = author or "unknown"
81 author = author or "unknown"
82
82
83 c = commit(parents=parents, date=date, author=author, desc=message)
83 c = commit(parents=parents, date=date, author=author, desc=message,
84 rev=version)
84 return c
85 return c
85
86
86 def gettags(self):
87 def gettags(self):
@@ -54,11 +54,11 b' class convert_mercurial(converter_sink):'
54
54
55 text = commit.desc
55 text = commit.desc
56 extra = {}
56 extra = {}
57 try:
57 if commit.branch:
58 extra["branch"] = commit.branch
58 extra['branch'] = commit.branch
59 except AttributeError:
59 if commit.rev:
60 pass
60 extra['convert_revision'] = commit.rev
61
61
62 while parents:
62 while parents:
63 p1 = p2
63 p1 = p2
64 p2 = parents.pop(0)
64 p2 = parents.pop(0)
@@ -484,7 +484,8 b' class convert_svn(converter_source):'
484 desc=log,
484 desc=log,
485 parents=parents,
485 parents=parents,
486 copies=copies,
486 copies=copies,
487 branch=branch)
487 branch=branch,
488 rev=rev.encode('utf-8'))
488
489
489 self.commits[rev] = cset
490 self.commits[rev] = cset
490 if self.child_cset and not self.child_cset.parents:
491 if self.child_cset and not self.child_cset.parents:
General Comments 0
You need to be logged in to leave comments. Login now