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

« back to all changes in this revision

Viewing changes to services/svnlogservice

  • Committer: Matt Giuca
  • Date: 2010-02-24 01:05:33 UTC
  • Revision ID: matt.giuca@gmail.com-20100224010533-ccr0d5fnp2k0qoyv
Removed ivle/webapp/admin/templates/subject.html, an empty template. Offeringservice no longer depends on it (it was the default template for that view, but never used).

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
 
27
27
import os
28
28
import sys
 
29
import locale
29
30
 
30
31
import cjson
31
32
import pysvn
32
33
 
33
34
import ivle.svn
34
35
 
 
36
# Set locale to UTF-8
 
37
locale.setlocale(locale.LC_CTYPE, "en_US.UTF-8")
 
38
 
35
39
try:
36
40
    client = pysvn.Client()
37
41
    client.exception_style = 1
38
 
    logs = client.log(os.path.join('/home', sys.argv[1]),
 
42
    logs = client.log(os.path.join('/home', sys.argv[1].decode('utf-8')),
39
43
                      discover_changed_paths=True)
40
44
    print cjson.encode({'logs': [{'revno': log.revision.number,
41
 
                                  'author': log.author,
42
 
                                  'message': log.message,
 
45
                                  'author': log.author.decode('utf-8'),
 
46
                                  'message': log.message.decode('utf-8'),
43
47
                                  'date': log.date,
44
 
                                  'paths': [(p.path, p.action)
 
48
                                  'paths': [(p.path.decode('utf-8'), p.action)
45
49
                                            for p in log.changed_paths]}
46
50
                                 for log in logs]})
47
51
except pysvn.ClientError, e: