hgext/histedit.py
changeset 29214 ceca932c080d
parent 29213 4a3d55281a85
child 29324 b501579147f1
--- a/hgext/histedit.py	Fri May 06 18:00:03 2016 -0700
+++ b/hgext/histedit.py	Fri May 06 18:12:36 2016 -0700
@@ -423,6 +423,14 @@
         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)