[PATCH] check-commit: remove confusion between summary line and other headers

Augie Fackler raf at durin42.com
Thu Dec 3 08:28:06 CST 2015


On Wed, Dec 02, 2015 at 07:38:05PM -0800, Pierre-Yves David wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david at fb.com>
> # 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

Queued this, thanks.

>
> 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"),
>  ]
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list