Mercurial > hg
comparison hgext/hgk.py @ 16683:525fdb738975
cleanup: eradicate long lines
author | Brodie Rao <brodie@sf.io> |
---|---|
date | Sat, 12 May 2012 15:54:54 +0200 |
parents | 35c2cc322ba8 |
children | 38caf405d010 |
comparison
equal
deleted
inserted
replaced
16676:654b9e1966f7 | 16683:525fdb738975 |
---|---|
93 | 93 |
94 def catcommit(ui, repo, n, prefix, ctx=None): | 94 def catcommit(ui, repo, n, prefix, ctx=None): |
95 nlprefix = '\n' + prefix | 95 nlprefix = '\n' + prefix |
96 if ctx is None: | 96 if ctx is None: |
97 ctx = repo[n] | 97 ctx = repo[n] |
98 ui.write("tree %s\n" % short(ctx.changeset()[0])) # use ctx.node() instead ?? | 98 # use ctx.node() instead ?? |
99 ui.write("tree %s\n" % short(ctx.changeset()[0])) | |
99 for p in ctx.parents(): | 100 for p in ctx.parents(): |
100 ui.write("parent %s\n" % p) | 101 ui.write("parent %s\n" % p) |
101 | 102 |
102 date = ctx.date() | 103 date = ctx.date() |
103 description = ctx.description().replace("\0", "") | 104 description = ctx.description().replace("\0", "") |
111 ui.write("committer %s %s %s\n" % (committer, int(date[0]), date[1])) | 112 ui.write("committer %s %s %s\n" % (committer, int(date[0]), date[1])) |
112 ui.write("revision %d\n" % ctx.rev()) | 113 ui.write("revision %d\n" % ctx.rev()) |
113 ui.write("branch %s\n\n" % ctx.branch()) | 114 ui.write("branch %s\n\n" % ctx.branch()) |
114 | 115 |
115 if prefix != "": | 116 if prefix != "": |
116 ui.write("%s%s\n" % (prefix, description.replace('\n', nlprefix).strip())) | 117 ui.write("%s%s\n" % (prefix, |
118 description.replace('\n', nlprefix).strip())) | |
117 else: | 119 else: |
118 ui.write(description + "\n") | 120 ui.write(description + "\n") |
119 if prefix: | 121 if prefix: |
120 ui.write('\0') | 122 ui.write('\0') |
121 | 123 |