##// END OF EJS Templates
convert.monotone: fix quotes and backslashes in change descriptions.
David Reiss -
r6632:aa3f6188 default
parent child Browse files
Show More
@@ -16,7 +16,7 b' class monotone_source(converter_source, '
16 16
17 17 # regular expressions for parsing monotone output
18 18 space = r'\s*'
19 name = r'\s+"((?:[^"]|\\")*)"\s*'
19 name = r'\s+"((?:\\"|[^"])*)"\s*'
20 20 value = name
21 21 revision = r'\s+\[(\w+)\]\s*'
22 22 lines = r'(?:.|\n)+'
@@ -98,11 +98,14 b' class monotone_source(converter_source, '
98 98 def mtngetcerts(self, rev):
99 99 certs = {"author":"<missing>", "date":"<missing>",
100 100 "changelog":"<missing>", "branch":"<missing>"}
101 cert_list = self.mtnrun("certs", rev).split("\n\n")
101 cert_list = self.mtnrun("certs", rev).split('\n\n key "')
102 102 for e in cert_list:
103 103 m = self.cert_re.match(e)
104 104 if m:
105 certs[m.group(1)] = m.group(2)
105 name, value = m.groups()
106 value = value.replace(r'\"', '"')
107 value = value.replace(r'\\', '\\')
108 certs[name] = value
106 109 return certs
107 110
108 111 def mtnrenamefiles(self, files, fromdir, todir):
General Comments 0
You need to be logged in to leave comments. Login now