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