equal
deleted
inserted
replaced
68 extra[k] = v |
68 extra[k] = v |
69 return extra |
69 return extra |
70 |
70 |
71 def encodeextra(d): |
71 def encodeextra(d): |
72 # keys must be sorted to produce a deterministic changelog entry |
72 # keys must be sorted to produce a deterministic changelog entry |
73 items = [_string_escape('%s:%s' % (k, d[k])) for k in sorted(d)] |
73 items = [ |
|
74 _string_escape('%s:%s' % (k, pycompat.bytestr(d[k]))) |
|
75 for k in sorted(d) |
|
76 ] |
74 return "\0".join(items) |
77 return "\0".join(items) |
75 |
78 |
76 def stripdesc(desc): |
79 def stripdesc(desc): |
77 """strip trailing whitespace and leading and trailing empty lines""" |
80 """strip trailing whitespace and leading and trailing empty lines""" |
78 return '\n'.join([l.rstrip() for l in desc.splitlines()]).strip('\n') |
81 return '\n'.join([l.rstrip() for l in desc.splitlines()]).strip('\n') |