2f55173bca52

api: encode ui.username's
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Wed, 21 Jul 2010 19:13:42 -0400
parents 53aadb5be2b6
children 6cd2b2e4286a
branches/tags (none)
files review/api.py

Changes

--- a/review/api.py	Tue Jul 20 19:59:33 2010 -0400
+++ b/review/api.py	Wed Jul 21 19:13:42 2010 -0400
@@ -469,7 +469,7 @@
         return filter(lambda s: s.author == username, self.signoffs)
 
     def signoffs_for_current_user(self):
-        return self.signoffs_for_user(self.ui.username())
+        return self.signoffs_for_user(fromlocal(self.ui.username()))
 
 
     def add_signoff(self, message, opinion='', style=''):
@@ -486,7 +486,7 @@
         if existing:
             raise SignoffExists
 
-        signoff = ReviewSignoff(self.ui.username(), util.makedate(),
+        signoff = ReviewSignoff(fromlocal(self.ui.username()), util.makedate(),
                                 self.node, opinion, message, style)
         signoff._commit(self.ui, self.repo)
 
@@ -509,7 +509,7 @@
         if filename and not ufilename:
             ufilename = fromlocal(filename)
 
-        comment = ReviewComment(self.ui.username(), util.makedate(),
+        comment = ReviewComment(fromlocal(self.ui.username()), util.makedate(),
             self.node, ufilename, filename, map(int, lines), message, style)
         comment._commit(self.ui, self.repo)