Mercurial > hg
annotate tests/test-contrib-check-commit.t @ 38158:4e790f0966fc
phases: define an official tuple of phases we do not share
Same motivation as for `mutablephases`, having a single definition helps with
updating phases logic.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Tue, 22 May 2018 18:10:37 +0200 |
parents | 2fb3ae89e4e1 |
children | 1bd3e922de18 |
rev | line source |
---|---|
27328
96dc6664fa9c
check-commit: add a test for the patch checking script in contrib
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
1 Test the 'check-commit' script |
96dc6664fa9c
check-commit: add a test for the patch checking script in contrib
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
2 ============================== |
96dc6664fa9c
check-commit: add a test for the patch checking script in contrib
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
3 |
27700
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
4 A fine patch: |
27328
96dc6664fa9c
check-commit: add a test for the patch checking script in contrib
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
5 |
96dc6664fa9c
check-commit: add a test for the patch checking script in contrib
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
6 $ cat > patch-with-long-header.diff << EOF |
96dc6664fa9c
check-commit: add a test for the patch checking script in contrib
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
7 > # HG changeset patch |
96dc6664fa9c
check-commit: add a test for the patch checking script in contrib
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
8 > # User timeless <timeless@mozdev.org> |
96dc6664fa9c
check-commit: add a test for the patch checking script in contrib
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
9 > # Date 1448911706 0 |
96dc6664fa9c
check-commit: add a test for the patch checking script in contrib
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
10 > # Mon Nov 30 19:28:26 2015 +0000 |
96dc6664fa9c
check-commit: add a test for the patch checking script in contrib
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
11 > # Node ID c41cb6d2b7dbd62b1033727f8606b8c09fc4aa88 |
96dc6664fa9c
check-commit: add a test for the patch checking script in contrib
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
12 > # Parent 42aa0e570eaa364a622bc4443b0bcb79b1100a58 |
96dc6664fa9c
check-commit: add a test for the patch checking script in contrib
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
13 > # ClownJoke This is a veryly long header that should not be warned about because its not the description |
27700
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
14 > bundle2: use Oxford comma (issue123) (BC) |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
15 > |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
16 > diff --git a/hgext/transplant.py b/hgext/transplant.py |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
17 > --- a/hgext/transplant.py |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
18 > +++ b/hgext/transplant.py |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
19 > @@ -599,7 +599,7 @@ |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
20 > return |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
21 > if not (opts.get('source') or revs or |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
22 > opts.get('merge') or opts.get('branch')): |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
23 > - raise error.Abort(_('no source URL, branch revision or revision ' |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
24 > + raise error.Abort(_('no source URL, branch revision, or revision ' |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
25 > 'list provided')) |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
26 > if opts.get('all'): |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
27 > |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
28 > + def blahblah(x): |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
29 > + pass |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
30 > EOF |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
31 $ cat patch-with-long-header.diff | $TESTDIR/../contrib/check-commit |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
32 |
30843
2fb3ae89e4e1
contrib: fix check-commit to not reject commits from `hg sign` and `hg tag`
Augie Fackler <augie@google.com>
parents:
28013
diff
changeset
|
33 This would normally be against the rules, but it's okay because that's |
2fb3ae89e4e1
contrib: fix check-commit to not reject commits from `hg sign` and `hg tag`
Augie Fackler <augie@google.com>
parents:
28013
diff
changeset
|
34 what tagging and signing looks like: |
2fb3ae89e4e1
contrib: fix check-commit to not reject commits from `hg sign` and `hg tag`
Augie Fackler <augie@google.com>
parents:
28013
diff
changeset
|
35 |
2fb3ae89e4e1
contrib: fix check-commit to not reject commits from `hg sign` and `hg tag`
Augie Fackler <augie@google.com>
parents:
28013
diff
changeset
|
36 $ cat > creates-a-tag.diff << EOF |
2fb3ae89e4e1
contrib: fix check-commit to not reject commits from `hg sign` and `hg tag`
Augie Fackler <augie@google.com>
parents:
28013
diff
changeset
|
37 > # HG changeset patch |
2fb3ae89e4e1
contrib: fix check-commit to not reject commits from `hg sign` and `hg tag`
Augie Fackler <augie@google.com>
parents:
28013
diff
changeset
|
38 > # User Augie Fackler <raf@durin42.com> |
2fb3ae89e4e1
contrib: fix check-commit to not reject commits from `hg sign` and `hg tag`
Augie Fackler <augie@google.com>
parents:
28013
diff
changeset
|
39 > # Date 1484787778 18000 |
2fb3ae89e4e1
contrib: fix check-commit to not reject commits from `hg sign` and `hg tag`
Augie Fackler <augie@google.com>
parents:
28013
diff
changeset
|
40 > # Wed Jan 18 20:02:58 2017 -0500 |
2fb3ae89e4e1
contrib: fix check-commit to not reject commits from `hg sign` and `hg tag`
Augie Fackler <augie@google.com>
parents:
28013
diff
changeset
|
41 > # Branch stable |
2fb3ae89e4e1
contrib: fix check-commit to not reject commits from `hg sign` and `hg tag`
Augie Fackler <augie@google.com>
parents:
28013
diff
changeset
|
42 > # Node ID c177635e4acf52923bc3aa9f72a5b1ad1197b173 |
2fb3ae89e4e1
contrib: fix check-commit to not reject commits from `hg sign` and `hg tag`
Augie Fackler <augie@google.com>
parents:
28013
diff
changeset
|
43 > # Parent a1dd2c0c479e0550040542e392e87bc91262517e |
2fb3ae89e4e1
contrib: fix check-commit to not reject commits from `hg sign` and `hg tag`
Augie Fackler <augie@google.com>
parents:
28013
diff
changeset
|
44 > Added tag 4.1-rc for changeset a1dd2c0c479e |
2fb3ae89e4e1
contrib: fix check-commit to not reject commits from `hg sign` and `hg tag`
Augie Fackler <augie@google.com>
parents:
28013
diff
changeset
|
45 > |
2fb3ae89e4e1
contrib: fix check-commit to not reject commits from `hg sign` and `hg tag`
Augie Fackler <augie@google.com>
parents:
28013
diff
changeset
|
46 > diff --git a/.hgtags b/.hgtags |
2fb3ae89e4e1
contrib: fix check-commit to not reject commits from `hg sign` and `hg tag`
Augie Fackler <augie@google.com>
parents:
28013
diff
changeset
|
47 > --- a/.hgtags |
2fb3ae89e4e1
contrib: fix check-commit to not reject commits from `hg sign` and `hg tag`
Augie Fackler <augie@google.com>
parents:
28013
diff
changeset
|
48 > +++ b/.hgtags |
2fb3ae89e4e1
contrib: fix check-commit to not reject commits from `hg sign` and `hg tag`
Augie Fackler <augie@google.com>
parents:
28013
diff
changeset
|
49 > @@ -150,3 +150,4 @@ 438173c415874f6ac653efc1099dec9c9150e90f |
2fb3ae89e4e1
contrib: fix check-commit to not reject commits from `hg sign` and `hg tag`
Augie Fackler <augie@google.com>
parents:
28013
diff
changeset
|
50 > eab27446995210c334c3d06f1a659e3b9b5da769 4.0 |
2fb3ae89e4e1
contrib: fix check-commit to not reject commits from `hg sign` and `hg tag`
Augie Fackler <augie@google.com>
parents:
28013
diff
changeset
|
51 > b3b1ae98f6a0e14c1e1ba806a6c18e193b6dae5c 4.0.1 |
2fb3ae89e4e1
contrib: fix check-commit to not reject commits from `hg sign` and `hg tag`
Augie Fackler <augie@google.com>
parents:
28013
diff
changeset
|
52 > e69874dc1f4e142746ff3df91e678a09c6fc208c 4.0.2 |
2fb3ae89e4e1
contrib: fix check-commit to not reject commits from `hg sign` and `hg tag`
Augie Fackler <augie@google.com>
parents:
28013
diff
changeset
|
53 > +a1dd2c0c479e0550040542e392e87bc91262517e 4.1-rc |
2fb3ae89e4e1
contrib: fix check-commit to not reject commits from `hg sign` and `hg tag`
Augie Fackler <augie@google.com>
parents:
28013
diff
changeset
|
54 > EOF |
2fb3ae89e4e1
contrib: fix check-commit to not reject commits from `hg sign` and `hg tag`
Augie Fackler <augie@google.com>
parents:
28013
diff
changeset
|
55 $ $TESTDIR/../contrib/check-commit < creates-a-tag.diff |
2fb3ae89e4e1
contrib: fix check-commit to not reject commits from `hg sign` and `hg tag`
Augie Fackler <augie@google.com>
parents:
28013
diff
changeset
|
56 |
27700
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
57 A patch with lots of errors: |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
58 |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
59 $ cat > patch-with-long-header.diff << EOF |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
60 > # HG changeset patch |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
61 > # User timeless |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
62 > # Date 1448911706 0 |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
63 > # Mon Nov 30 19:28:26 2015 +0000 |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
64 > # Node ID c41cb6d2b7dbd62b1033727f8606b8c09fc4aa88 |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
65 > # Parent 42aa0e570eaa364a622bc4443b0bcb79b1100a58 |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
66 > # ClownJoke This is a veryly long header that should not be warned about because its not the description |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
67 > transplant/foo: this summary is way too long use Oxford comma (bc) (bug123) (issue 244) |
27328
96dc6664fa9c
check-commit: add a test for the patch checking script in contrib
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
68 > |
96dc6664fa9c
check-commit: add a test for the patch checking script in contrib
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
69 > diff --git a/hgext/transplant.py b/hgext/transplant.py |
96dc6664fa9c
check-commit: add a test for the patch checking script in contrib
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
70 > --- a/hgext/transplant.py |
96dc6664fa9c
check-commit: add a test for the patch checking script in contrib
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
71 > +++ b/hgext/transplant.py |
96dc6664fa9c
check-commit: add a test for the patch checking script in contrib
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
72 > @@ -599,7 +599,7 @@ |
96dc6664fa9c
check-commit: add a test for the patch checking script in contrib
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
73 > return |
96dc6664fa9c
check-commit: add a test for the patch checking script in contrib
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
74 > if not (opts.get('source') or revs or |
96dc6664fa9c
check-commit: add a test for the patch checking script in contrib
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
75 > opts.get('merge') or opts.get('branch')): |
96dc6664fa9c
check-commit: add a test for the patch checking script in contrib
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
76 > - raise error.Abort(_('no source URL, branch revision or revision ' |
96dc6664fa9c
check-commit: add a test for the patch checking script in contrib
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
77 > + raise error.Abort(_('no source URL, branch revision, or revision ' |
96dc6664fa9c
check-commit: add a test for the patch checking script in contrib
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
78 > 'list provided')) |
96dc6664fa9c
check-commit: add a test for the patch checking script in contrib
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
79 > if opts.get('all'): |
96dc6664fa9c
check-commit: add a test for the patch checking script in contrib
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
80 > EOF |
96dc6664fa9c
check-commit: add a test for the patch checking script in contrib
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff
changeset
|
81 $ cat patch-with-long-header.diff | $TESTDIR/../contrib/check-commit |
27783
1d095371de47
check-commit: sort errors by line number
timeless <timeless@mozdev.org>
parents:
27782
diff
changeset
|
82 1: username is not an email address |
1d095371de47
check-commit: sort errors by line number
timeless <timeless@mozdev.org>
parents:
27782
diff
changeset
|
83 # User timeless |
1d095371de47
check-commit: sort errors by line number
timeless <timeless@mozdev.org>
parents:
27782
diff
changeset
|
84 7: summary keyword should be most user-relevant one-word command or topic |
27700
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
85 transplant/foo: this summary is way too long use Oxford comma (bc) (bug123) (issue 244) |
27783
1d095371de47
check-commit: sort errors by line number
timeless <timeless@mozdev.org>
parents:
27782
diff
changeset
|
86 7: (BC) needs to be uppercase |
27700
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
87 transplant/foo: this summary is way too long use Oxford comma (bc) (bug123) (issue 244) |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
88 7: use (issueDDDD) instead of bug |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
89 transplant/foo: this summary is way too long use Oxford comma (bc) (bug123) (issue 244) |
27783
1d095371de47
check-commit: sort errors by line number
timeless <timeless@mozdev.org>
parents:
27782
diff
changeset
|
90 7: no space allowed between issue and number |
27700
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
91 transplant/foo: this summary is way too long use Oxford comma (bc) (bug123) (issue 244) |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
92 7: summary line too long (limit is 78) |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
93 transplant/foo: this summary is way too long use Oxford comma (bc) (bug123) (issue 244) |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
94 [1] |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
95 |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
96 A patch with other errors: |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
97 |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
98 $ cat > patch-with-long-header.diff << EOF |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
99 > # HG changeset patch |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
100 > # User timeless |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
101 > # Date 1448911706 0 |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
102 > # Mon Nov 30 19:28:26 2015 +0000 |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
103 > # Node ID c41cb6d2b7dbd62b1033727f8606b8c09fc4aa88 |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
104 > # Parent 42aa0e570eaa364a622bc4443b0bcb79b1100a58 |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
105 > # ClownJoke This is a veryly long header that should not be warned about because its not the description |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
106 > This has no topic and ends with a period. |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
107 > |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
108 > diff --git a/hgext/transplant.py b/hgext/transplant.py |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
109 > --- a/hgext/transplant.py |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
110 > +++ b/hgext/transplant.py |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
111 > @@ -599,7 +599,7 @@ |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
112 > if opts.get('all'): |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
113 > |
28013
e529b5f1b9e3
check-commit: check for double-addition of blank lines
Matt Mackall <mpm@selenic.com>
parents:
27783
diff
changeset
|
114 > |
e529b5f1b9e3
check-commit: check for double-addition of blank lines
Matt Mackall <mpm@selenic.com>
parents:
27783
diff
changeset
|
115 > + |
e529b5f1b9e3
check-commit: check for double-addition of blank lines
Matt Mackall <mpm@selenic.com>
parents:
27783
diff
changeset
|
116 > + some = otherjunk |
e529b5f1b9e3
check-commit: check for double-addition of blank lines
Matt Mackall <mpm@selenic.com>
parents:
27783
diff
changeset
|
117 > + |
27700
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
118 > + |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
119 > + def blah_blah(x): |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
120 > + pass |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
121 > + |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
122 > |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
123 > EOF |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
124 $ cat patch-with-long-header.diff | $TESTDIR/../contrib/check-commit |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
125 1: username is not an email address |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
126 # User timeless |
27783
1d095371de47
check-commit: sort errors by line number
timeless <timeless@mozdev.org>
parents:
27782
diff
changeset
|
127 7: don't capitalize summary lines |
27700
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
128 This has no topic and ends with a period. |
27783
1d095371de47
check-commit: sort errors by line number
timeless <timeless@mozdev.org>
parents:
27782
diff
changeset
|
129 7: summary line doesn't start with 'topic: ' |
27700
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
130 This has no topic and ends with a period. |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
131 7: don't add trailing period on summary line |
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
132 This has no topic and ends with a period. |
27783
1d095371de47
check-commit: sort errors by line number
timeless <timeless@mozdev.org>
parents:
27782
diff
changeset
|
133 19: adds double empty line |
1d095371de47
check-commit: sort errors by line number
timeless <timeless@mozdev.org>
parents:
27782
diff
changeset
|
134 + |
28013
e529b5f1b9e3
check-commit: check for double-addition of blank lines
Matt Mackall <mpm@selenic.com>
parents:
27783
diff
changeset
|
135 20: adds a function with foo_bar naming |
e529b5f1b9e3
check-commit: check for double-addition of blank lines
Matt Mackall <mpm@selenic.com>
parents:
27783
diff
changeset
|
136 + def blah_blah(x): |
e529b5f1b9e3
check-commit: check for double-addition of blank lines
Matt Mackall <mpm@selenic.com>
parents:
27783
diff
changeset
|
137 23: adds double empty line |
e529b5f1b9e3
check-commit: check for double-addition of blank lines
Matt Mackall <mpm@selenic.com>
parents:
27783
diff
changeset
|
138 + |
27700
374fad80ce69
tests: extend check-commit self-tests
Matt Mackall <mpm@selenic.com>
parents:
27328
diff
changeset
|
139 [1] |