hgext/amend.py
changeset 34889 554885e10868
parent 34795 530b7361e3a9
child 34970 3e549546a6e9
--- a/hgext/amend.py	Wed Oct 18 15:05:03 2017 -0700
+++ b/hgext/amend.py	Thu Oct 19 03:20:47 2017 +0530
@@ -16,6 +16,7 @@
 from mercurial import (
     cmdutil,
     commands,
+    error,
     registrar,
 )
 
@@ -45,6 +46,8 @@
 
     See :hg:`help commit` for more details.
     """
+    if len(opts['note']) > 255:
+        raise error.Abort(_("cannot store a note of more than 255 bytes"))
     with repo.wlock(), repo.lock():
         if not opts.get('logfile'):
             opts['message'] = opts.get('message') or repo['.'].description()