Mercurial > hg
changeset 9823:11d7bb5e0df2
convert/mtn: handle change in mtn 0.45 certs output
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Tue, 10 Nov 2009 23:45:24 +0100 |
parents | 8b3e0435e690 |
children | 87c92b260710 |
files | hgext/convert/monotone.py |
diffstat | 1 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/convert/monotone.py Tue Nov 10 22:42:13 2009 +0100 +++ b/hgext/convert/monotone.py Tue Nov 10 23:45:24 2009 +0100 @@ -102,8 +102,13 @@ def mtngetcerts(self, rev): certs = {"author":"<missing>", "date":"<missing>", "changelog":"<missing>", "branch":"<missing>"} - cert_list = self.mtnrun("certs", rev).split('\n\n key "') - for e in cert_list: + certlist = self.mtnrun("certs", rev) + # mtn < 0.45: + # key "test@selenic.com" + # mtn >= 0.45: + # key [ff58a7ffb771907c4ff68995eada1c4da068d328] + certlist = re.split('\n\n key ["\[]', certlist) + for e in certlist: m = self.cert_re.match(e) if m: name, value = m.groups()