Show More
@@ -805,17 +805,18 b' def between(repo, old, new, keep):' | |||
|
805 | 805 | raise util.Abort(_('cannot edit immutable changeset: %s') % root) |
|
806 | 806 | return [c.node() for c in ctxs] |
|
807 | 807 | |
|
808 | def makedesc(c): | |
|
809 |
"""build a initial action line for a ctx |
|
|
808 | def makedesc(repo, action, rev): | |
|
809 | """build a initial action line for a ctx | |
|
810 | 810 | |
|
811 | 811 | line are in the form: |
|
812 | 812 | |
|
813 |
|
|
|
813 | <action> <hash> <rev> <summary> | |
|
814 | 814 | """ |
|
815 | ctx = repo[rev] | |
|
815 | 816 | summary = '' |
|
816 | if c.description(): | |
|
817 | summary = c.description().splitlines()[0] | |
|
818 |
line = ' |
|
|
817 | if ctx.description(): | |
|
818 | summary = ctx.description().splitlines()[0] | |
|
819 | line = '%s %s %d %s' % (action, ctx, ctx.rev(), summary) | |
|
819 | 820 | # trim to 80 columns so it's not stupidly wide in my editor |
|
820 | 821 | return util.ellipsis(line, 80) |
|
821 | 822 | |
@@ -824,7 +825,7 b' def ruleeditor(repo, ui, rules, editcomm' | |||
|
824 | 825 | |
|
825 | 826 | rules are in the format [ [act, ctx], ...] like in state.rules |
|
826 | 827 | """ |
|
827 |
rules = '\n'.join([makedesc(repo |
|
|
828 | rules = '\n'.join([makedesc(repo, act, rev) for [act, rev] in rules]) | |
|
828 | 829 | rules += '\n\n' |
|
829 | 830 | rules += editcomment |
|
830 | 831 | rules = ui.edit(rules, ui.username()) |
General Comments 0
You need to be logged in to leave comments.
Login now