##// 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 # regular expressions for parsing monotone output
17 # regular expressions for parsing monotone output
18 space = r'\s*'
18 space = r'\s*'
19 name = r'\s+"((?:[^"]|\\")*)"\s*'
19 name = r'\s+"((?:\\"|[^"])*)"\s*'
20 value = name
20 value = name
21 revision = r'\s+\[(\w+)\]\s*'
21 revision = r'\s+\[(\w+)\]\s*'
22 lines = r'(?:.|\n)+'
22 lines = r'(?:.|\n)+'
@@ -98,11 +98,14 b' class monotone_source(converter_source, '
98 def mtngetcerts(self, rev):
98 def mtngetcerts(self, rev):
99 certs = {"author":"<missing>", "date":"<missing>",
99 certs = {"author":"<missing>", "date":"<missing>",
100 "changelog":"<missing>", "branch":"<missing>"}
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 for e in cert_list:
102 for e in cert_list:
103 m = self.cert_re.match(e)
103 m = self.cert_re.match(e)
104 if m:
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 return certs
109 return certs
107
110
108 def mtnrenamefiles(self, files, fromdir, todir):
111 def mtnrenamefiles(self, files, fromdir, todir):
General Comments 0
You need to be logged in to leave comments. Login now