From patchwork Thu Dec 3 03:38:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: check-commit: remove confusion between summary line and other headers From: Pierre-Yves David X-Patchwork-Id: 11779 Message-Id: <1bd759b059d92f2d6917.1449113885@marginatus.alto.octopoid.net> To: mercurial-devel@selenic.com Cc: Pierre-Yves David Date: Wed, 02 Dec 2015 19:38:05 -0800 # HG changeset patch # User Pierre-Yves David # Date 1446848862 18000 # Fri Nov 06 17:27:42 2015 -0500 # Node ID 1bd759b059d92f2d6917776e65afee992a645625 # Parent 91905c0c47377520eebdedcfa6bcb73b77e24e0c # EXP-Topic checkcommitheader # Available At http://hg.netv6.net/marmoute-wip/mercurial/ # hg pull http://hg.netv6.net/marmoute-wip/mercurial/ -r 1bd759b059d9 check-commit: remove confusion between summary line and other headers The pull url header can easily grow over 80 chars. The check-commit script was confusing this with a too long summary line. We update the regular expression to not match other header. diff --git a/contrib/check-commit b/contrib/check-commit --- a/contrib/check-commit +++ b/contrib/check-commit @@ -25,11 +25,11 @@ errors = [ (r"^# .*\n(?!merge with )[^#]\S+[^:] ", "summary line doesn't start with 'topic: '"), (r"^# .*\n[A-Z][a-z]\S+", "don't capitalize summary lines"), (r"^# .*\n[^\n]*: *[A-Z][a-z]\S+", "don't capitalize summary lines"), (r"^# .*\n.*\.\s+$", "don't add trailing period on summary line"), - (r"^# .*\n.{78,}", "summary line too long (limit is 78)"), + (r"^# .*\n[^#].{77,}", "summary line too long (limit is 78)"), (r"^\+\n \n", "adds double empty line"), (r"^ \n\+\n", "adds double empty line"), (r"^\+[ \t]+def [a-z]+_[a-z]", "adds a function with foo_bar naming"), ]