hgext/histedit.py
changeset 29465 00d2bf4137e6
parent 29324 b501579147f1
child 29466 a0efbfbba7b5
--- a/hgext/histedit.py	Thu Jun 30 13:06:19 2016 -0700
+++ b/hgext/histedit.py	Thu May 26 16:46:10 2016 -0700
@@ -423,14 +423,6 @@
         summary = ''
         if ctx.description():
             summary = ctx.description().splitlines()[0]
-
-        fword = summary.split(' ', 1)[0].lower()
-        # if it doesn't end with the special character '!' just skip this
-        if (self.repo.ui.configbool("experimental", "histedit.autoverb") and
-            initial and fword.endswith('!')):
-            fword = fword[:-1]
-            if fword in primaryactions | secondaryactions | tertiaryactions:
-                self.verb = fword
         line = '%s %s %d %s' % (self.verb, ctx, ctx.rev(), summary)
         # trim to 75 columns by default so it's not stupidly wide in my editor
         # (the 5 more are left for verb)
@@ -1317,6 +1309,20 @@
 
     rules are in the format [ [act, ctx], ...] like in state.rules
     """
+    if repo.ui.configbool("experimental", "histedit.autoverb"):
+        for act in actions:
+            ctx = repo[act.node]
+            summary = ''
+            if ctx.description():
+                summary = ctx.description().splitlines()[0]
+
+            fword = summary.split(' ', 1)[0].lower()
+            # if it doesn't end with the special character '!' just skip this
+            if fword.endswith('!'):
+                fword = fword[:-1]
+                if fword in primaryactions | secondaryactions | tertiaryactions:
+                    act.verb = fword
+
     rules = '\n'.join([act.torule(initial=True) for act in actions])
     rules += '\n\n'
     rules += editcomment