projects
/
mw
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bdb2eb2
)
Fix unicode errors on commit
author
Ian Weller
<ian@ianweller.org>
Sun, 14 Mar 2010 17:56:04 +0000
(12:56 -0500)
committer
Ian Weller
<ian@ianweller.org>
Sun, 14 Mar 2010 17:56:04 +0000
(12:56 -0500)
src/mw/clicommands.py
patch
|
blob
|
history
diff --git
a/src/mw/clicommands.py
b/src/mw/clicommands.py
index 92a852c9e2dd6684bb2d8347899814bc4bd1295d..4b4d3e5c79be1fb9d02e61f47b7e1f4a73399f2a 100644
(file)
--- a/
src/mw/clicommands.py
+++ b/
src/mw/clicommands.py
@@
-221,6
+221,7
@@
class CommitCommand(CommandBase):
# FIXME use basetimestamp and starttimestamp
filename = os.path.join(self.metadir.root, file)
text = codecs.open(filename, 'r', 'utf-8').read()
# FIXME use basetimestamp and starttimestamp
filename = os.path.join(self.metadir.root, file)
text = codecs.open(filename, 'r', 'utf-8').read()
+ text = text.encode('utf-8')
if text[-1] == '\n':
text = text[:-1]
md5 = hashlib.md5()
if text[-1] == '\n':
text = text[:-1]
md5 = hashlib.md5()
@@
-244,7
+245,6
@@
class CommitCommand(CommandBase):
'ids|flags|timestamp|user|comment|content',
}
response = self.api.call(data)['query']['pages']
'ids|flags|timestamp|user|comment|content',
}
response = self.api.call(data)['query']['pages']
- print response
self.metadir.pages_add_rv(int(pageid),
response[pageid]['revisions'][0])
else:
self.metadir.pages_add_rv(int(pageid),
response[pageid]['revisions'][0])
else:
Benjamin Mako Hill
||
Want to submit a patch?