hgext/commitextras.py
branchstable
changeset 33606 806351695c6a
parent 33602 27fbca750b4d
child 34975 901a18b03e00
--- a/hgext/commitextras.py	Sat Jul 29 19:12:48 2017 -0700
+++ b/hgext/commitextras.py	Sun Jul 30 12:19:46 2017 +0530
@@ -54,6 +54,9 @@
                                 "KEY=VALUE format")
                         raise error.Abort(msg % raw)
                     k, v = raw.split('=', 1)
+                    if not k:
+                        msg = _("unable to parse '%s', keys can't be empty")
+                        raise error.Abort(msg % raw)
                     if re.search('[^\w-]', k):
                         msg = _("keys can only contain ascii letters, digits,"
                                 " '_' and '-'")