From: reagle Date: Thu, 3 Feb 2011 13:52:29 +0000 (-0500) Subject: commit needs to write latest rev to file too, as text may be changed such as a sig... X-Git-Url: https://projects.mako.cc/source/mw/commitdiff_plain/d18bf4d870cf3c3561aa4611345c824af77c1e32?hp=993ca0c147e9801768f7e5aa3f21c8f22fe0e897 commit needs to write latest rev to file too, as text may be changed such as a sig, e.g., -~ => -[[User:Reagle|Reagle]] --- diff --git a/src/mw/clicommands.py b/src/mw/clicommands.py index dcc5682..3be6da3 100644 --- a/src/mw/clicommands.py +++ b/src/mw/clicommands.py @@ -346,6 +346,12 @@ class CommitCommand(CommandBase): response = self.api.call(data)['query']['pages'] self.metadir.pages_add_rv(int(pageid), response[pageid]['revisions'][0]) + # need to write latest rev to file too, as text may be changed + # such as a signature + with file(full_filename, 'w') as fd: + data = response[pageid]['revisions'][0]['*'] + data = data.encode('utf-8') + fd.write(data) if file_num != len(status) - 1: print 'waiting 3s before processing the next file' time.sleep(3)