~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to services/svnlogservice

  • Committer: Matt Giuca
  • Date: 2010-02-18 08:28:42 UTC
  • Revision ID: matt.giuca@gmail.com-20100218082842-51mbttp18joantar
svnlogservice: utf-8 decoding of the relevant parts of the dictionary, so they are put into JSON as unicode strings, not UTF-8 strings which are decoded wrongly. svnlog now displays unicode characters correctly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
    logs = client.log(os.path.join('/home', sys.argv[1]),
43
43
                      discover_changed_paths=True)
44
44
    print cjson.encode({'logs': [{'revno': log.revision.number,
45
 
                                  'author': log.author,
46
 
                                  'message': log.message,
 
45
                                  'author': log.author.decode('utf-8'),
 
46
                                  'message': log.message.decode('utf-8'),
47
47
                                  'date': log.date,
48
 
                                  'paths': [(p.path, p.action)
 
48
                                  'paths': [(p.path.decode('utf-8'), p.action)
49
49
                                            for p in log.changed_paths]}
50
50
                                 for log in logs]})
51
51
except pysvn.ClientError, e: