Show More
@@ -20,10 +20,10 b' def parseentry(entry):' | |||
|
20 | 20 | if paths: |
|
21 | 21 | paths = paths[0] |
|
22 | 22 | for p in paths.getElementsByTagName('path'): |
|
23 | action = p.getAttribute('action') | |
|
24 | path = xmltext(p) | |
|
25 | frompath = p.getAttribute('copyfrom-path') | |
|
26 | fromrev = p.getAttribute('copyfrom-rev') | |
|
23 | action = p.getAttribute('action').encode('utf-8') | |
|
24 | path = xmltext(p).encode('utf-8') | |
|
25 | frompath = p.getAttribute('copyfrom-path').encode('utf-8') | |
|
26 | fromrev = p.getAttribute('copyfrom-rev').encode('utf-8') | |
|
27 | 27 | e['paths'].append((path, action, frompath, fromrev)) |
|
28 | 28 | return e |
|
29 | 29 | |
@@ -43,11 +43,11 b' def printentries(entries):' | |||
|
43 | 43 | for k in ('revision', 'author', 'msg'): |
|
44 | 44 | fp.write(('%s: %s\n' % (k, e[k])).encode('utf-8')) |
|
45 | 45 | for path, action, fpath, frev in sorted(e['paths']): |
|
46 | frominfo = '' | |
|
46 | frominfo = b'' | |
|
47 | 47 | if frev: |
|
48 | frominfo = ' (from %s@%s)' % (fpath, frev) | |
|
49 | p = ' %s %s%s\n' % (action, path, frominfo) | |
|
50 |
fp.write(p |
|
|
48 | frominfo = b' (from %s@%s)' % (fpath, frev) | |
|
49 | p = b' %s %s%s\n' % (action, path, frominfo) | |
|
50 | fp.write(p) | |
|
51 | 51 | |
|
52 | 52 | if __name__ == '__main__': |
|
53 | 53 | data = sys.stdin.read() |
General Comments 0
You need to be logged in to leave comments.
Login now