Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 5c / 75743bed4b592280e6e63df5776f5edee3f837
1 Return-Path: <bremner@tethera.net>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 5D31F431FAF\r
6         for <notmuch@notmuchmail.org>; Mon, 24 Dec 2012 05:47:47 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id CZNhqIcdADMD for <notmuch@notmuchmail.org>;\r
16         Mon, 24 Dec 2012 05:47:46 -0800 (PST)\r
17 Received: from tesseract.cs.unb.ca (tesseract.cs.unb.ca [131.202.240.238])\r
18         (using TLSv1 with cipher AES256-SHA (256/256 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id D1199431FAE\r
21         for <notmuch@notmuchmail.org>; Mon, 24 Dec 2012 05:47:46 -0800 (PST)\r
22 Received: from fctnnbsc30w-156034082078.dhcp-dynamic.fibreop.nb.bellaliant.net\r
23         ([156.34.82.78] helo=zancas.localnet)\r
24         by tesseract.cs.unb.ca with esmtpsa\r
25         (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72)\r
26         (envelope-from <bremner@tethera.net>)\r
27         id 1Tn8Nb-0000RI-Cx; Mon, 24 Dec 2012 09:47:43 -0400\r
28 Received: from bremner by zancas.localnet with local (Exim 4.80)\r
29         (envelope-from <bremner@tethera.net>)\r
30         id 1Tn8NV-0006l0-Kp; Mon, 24 Dec 2012 09:47:37 -0400\r
31 From: david@tethera.net\r
32 To: notmuch@notmuchmail.org\r
33 Subject: [PATCH] devel: add script to run tests on a patch series.\r
34 Date: Mon, 24 Dec 2012 09:47:33 -0400\r
35 Message-Id: <1356356853-25746-1-git-send-email-david@tethera.net>\r
36 X-Mailer: git-send-email 1.7.10.4\r
37 X-Spam_bar: -\r
38 Cc: David Bremner <bremner@debian.org>\r
39 X-BeenThere: notmuch@notmuchmail.org\r
40 X-Mailman-Version: 2.1.13\r
41 Precedence: list\r
42 List-Id: "Use and development of the notmuch mail system."\r
43         <notmuch.notmuchmail.org>\r
44 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
45         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
46 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
47 List-Post: <mailto:notmuch@notmuchmail.org>\r
48 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
49 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
50         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
51 X-List-Received-Date: Mon, 24 Dec 2012 13:47:47 -0000\r
52 \r
53 From: David Bremner <bremner@debian.org>\r
54 \r
55 This script is a thin wrapper around git rebase --interactive, that\r
56 allows the user to fine tune patches if they break the test suite, or\r
57 violate the coding style guidelines.\r
58 \r
59 The user can always run "git rebase --continue" to ignore false positives.\r
60 \r
61 I decided to use perl because inplace editing with sed is non-portable.\r
62 ---\r
63 \r
64 I have caught several formatting violations and at least one real bug \r
65 using this as "last step before sending to the list".\r
66 \r
67 No doubt the more talented shell-scripters / perl-hackers in the crowd\r
68 can can suggest some improvements.\r
69 \r
70  devel/check-commit |   10 ++++++++++\r
71  devel/check-series |   33 +++++++++++++++++++++++++++++++++\r
72  2 files changed, 43 insertions(+)\r
73  create mode 100755 devel/check-commit\r
74  create mode 100755 devel/check-series\r
75 \r
76 diff --git a/devel/check-commit b/devel/check-commit\r
77 new file mode 100755\r
78 index 0000000..86648b8\r
79 --- /dev/null\r
80 +++ b/devel/check-commit\r
81 @@ -0,0 +1,10 @@\r
82 +# This script is mainly intended to be used by the check-series script\r
83 +# but you are welcome to use it as a standalone tool. It takes no\r
84 +# parameters and operates on the latest git commit (HEAD).\r
85 +\r
86 +set -e\r
87 +make test\r
88 +for file in $(git diff --name-only HEAD^ | grep '[.]\(c\|h\|cc\|hh\)'); do\r
89 +    uncrustify --replace -c devel/uncrustify.cfg $file\r
90 +done\r
91 +git diff --quiet\r
92 diff --git a/devel/check-series b/devel/check-series\r
93 new file mode 100755\r
94 index 0000000..d48e70f\r
95 --- /dev/null\r
96 +++ b/devel/check-series\r
97 @@ -0,0 +1,33 @@\r
98 +#/bin/sh\r
99 +\r
100 +# Usage: check-series [upstream-commit]\r
101 +\r
102 +# Checks each commit in a patch series (topic branch) by running the\r
103 +# script devel/check-commit. If check-commit fails (exits with\r
104 +# non-zero status), the user is left in the middle of a git rebase, and\r
105 +# can fix the commit, e.g. using git commit --amend, followed by\r
106 +# "git rebase --continue". If all else fails, "git rebase --abort" should\r
107 +# get you back to where you started.\r
108 +#\r
109 +# NOTE: this runs "make test" many times, so it can take a while.\r
110 +#\r
111 +\r
112 +trap cleanup EXIT\r
113 +\r
114 +cleanup () {\r
115 +    if [ -n "$tmpdir" ]; then\r
116 +       rm -rf $tmpdir\r
117 +    fi\r
118 +}\r
119 +\r
120 +upstream=master\r
121 +if [ -n "$1" ]; then\r
122 +    upstream="$1"\r
123 +fi\r
124 +\r
125 +# make sure we always run the most recent version of check-commit\r
126 +# in particular cope with it going away.\r
127 +tmpdir=$(mktemp -d)\r
128 +cp devel/check-commit $tmpdir\r
129 +\r
130 +GIT_SEQUENCE_EDITOR="perl -pi -e 's,^\s*([^#\s].*)$,\1\nexec $tmpdir/check-commit,'" git rebase -i $upstream\r
131 -- \r
132 1.7.10.4\r
133 \r