Show More
@@ -423,14 +423,6 b' class histeditaction(object):' | |||||
423 | summary = '' |
|
423 | summary = '' | |
424 | if ctx.description(): |
|
424 | if ctx.description(): | |
425 | summary = ctx.description().splitlines()[0] |
|
425 | summary = ctx.description().splitlines()[0] | |
426 |
|
||||
427 | fword = summary.split(' ', 1)[0].lower() |
|
|||
428 | # if it doesn't end with the special character '!' just skip this |
|
|||
429 | if (self.repo.ui.configbool("experimental", "histedit.autoverb") and |
|
|||
430 | initial and fword.endswith('!')): |
|
|||
431 | fword = fword[:-1] |
|
|||
432 | if fword in primaryactions | secondaryactions | tertiaryactions: |
|
|||
433 | self.verb = fword |
|
|||
434 | line = '%s %s %d %s' % (self.verb, ctx, ctx.rev(), summary) |
|
426 | line = '%s %s %d %s' % (self.verb, ctx, ctx.rev(), summary) | |
435 | # trim to 75 columns by default so it's not stupidly wide in my editor |
|
427 | # trim to 75 columns by default so it's not stupidly wide in my editor | |
436 | # (the 5 more are left for verb) |
|
428 | # (the 5 more are left for verb) | |
@@ -1317,6 +1309,20 b' def ruleeditor(repo, ui, actions, editco' | |||||
1317 |
|
1309 | |||
1318 | rules are in the format [ [act, ctx], ...] like in state.rules |
|
1310 | rules are in the format [ [act, ctx], ...] like in state.rules | |
1319 | """ |
|
1311 | """ | |
|
1312 | if repo.ui.configbool("experimental", "histedit.autoverb"): | |||
|
1313 | for act in actions: | |||
|
1314 | ctx = repo[act.node] | |||
|
1315 | summary = '' | |||
|
1316 | if ctx.description(): | |||
|
1317 | summary = ctx.description().splitlines()[0] | |||
|
1318 | ||||
|
1319 | fword = summary.split(' ', 1)[0].lower() | |||
|
1320 | # if it doesn't end with the special character '!' just skip this | |||
|
1321 | if fword.endswith('!'): | |||
|
1322 | fword = fword[:-1] | |||
|
1323 | if fword in primaryactions | secondaryactions | tertiaryactions: | |||
|
1324 | act.verb = fword | |||
|
1325 | ||||
1320 | rules = '\n'.join([act.torule(initial=True) for act in actions]) |
|
1326 | rules = '\n'.join([act.torule(initial=True) for act in actions]) | |
1321 | rules += '\n\n' |
|
1327 | rules += '\n\n' | |
1322 | rules += editcomment |
|
1328 | rules += editcomment |
General Comments 0
You need to be logged in to leave comments.
Login now