Show More
@@ -1,216 +1,219 b'' | |||
|
1 | 1 | |
|
2 | 2 | $ cat <<EOF >> $HGRCPATH |
|
3 | 3 | > [extensions] |
|
4 | 4 | > notify= |
|
5 | 5 | > |
|
6 | 6 | > [hooks] |
|
7 | 7 | > changegroup.notify = python:hgext.notify.hook |
|
8 | 8 | > |
|
9 | 9 | > [notify] |
|
10 | 10 | > sources = push |
|
11 | 11 | > diffstat = False |
|
12 | 12 | > maxsubject = 10 |
|
13 | 13 | > |
|
14 | 14 | > [usersubs] |
|
15 | 15 | > foo@bar = * |
|
16 | 16 | > |
|
17 | 17 | > [reposubs] |
|
18 | 18 | > * = baz |
|
19 | 19 | > EOF |
|
20 | 20 | $ hg init a |
|
21 | 21 | |
|
22 | 22 | clone |
|
23 | 23 | |
|
24 | 24 | $ hg --traceback clone a b |
|
25 | 25 | updating to branch default |
|
26 | 26 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
27 | 27 | $ echo a > b/a |
|
28 | 28 | |
|
29 | 29 | commit |
|
30 | 30 | |
|
31 | 31 | $ hg --traceback --cwd b commit -Ama |
|
32 | 32 | adding a |
|
33 | 33 | $ echo a >> b/a |
|
34 | 34 | |
|
35 | 35 | commit |
|
36 | 36 | |
|
37 | 37 | $ hg --traceback --cwd b commit -Amb |
|
38 | 38 | |
|
39 | 39 | push |
|
40 | 40 | |
|
41 | 41 | $ hg --traceback --cwd b push ../a 2>&1 | |
|
42 | > "$PYTHON" $TESTDIR/unwrap-message-id.py | \ | |
|
42 | 43 | > "$PYTHON" -c 'from __future__ import print_function ; import sys,re; print(re.sub("\n\t", " ", sys.stdin.read()), end="")' |
|
43 | 44 | pushing to ../a |
|
44 | 45 | searching for changes |
|
45 | 46 | adding changesets |
|
46 | 47 | adding manifests |
|
47 | 48 | adding file changes |
|
48 | 49 | added 2 changesets with 2 changes to 1 files |
|
49 | 50 | MIME-Version: 1.0 |
|
50 | 51 | Content-Type: text/plain; charset="us-ascii" |
|
51 | 52 | Content-Transfer-Encoding: 7bit |
|
52 | 53 | Date: * (glob) |
|
53 | 54 | Subject: * (glob) |
|
54 | 55 | From: test |
|
55 | 56 | X-Hg-Notification: changeset cb9a9f314b8b |
|
56 | 57 | Message-Id: <*> (glob) |
|
57 | 58 | To: baz, foo@bar |
|
58 | 59 | |
|
59 | 60 | changeset cb9a9f314b8b in $TESTTMP/a |
|
60 | 61 | details: $TESTTMP/a?cmd=changeset;node=cb9a9f314b8b |
|
61 | 62 | summary: a |
|
62 | 63 | |
|
63 | 64 | changeset ba677d0156c1 in $TESTTMP/a |
|
64 | 65 | details: $TESTTMP/a?cmd=changeset;node=ba677d0156c1 |
|
65 | 66 | summary: b |
|
66 | 67 | |
|
67 | 68 | diffs (6 lines): |
|
68 | 69 | |
|
69 | 70 | diff -r 000000000000 -r ba677d0156c1 a |
|
70 | 71 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
71 | 72 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
72 | 73 | @@ -0,0 +1,2 @@ |
|
73 | 74 | +a |
|
74 | 75 | +a |
|
75 | 76 | $ hg --cwd a rollback |
|
76 | 77 | repository tip rolled back to revision -1 (undo push) |
|
77 | 78 | |
|
78 | 79 | unbundle with unrelated source |
|
79 | 80 | |
|
80 | 81 | $ hg --cwd b bundle ../test.hg ../a |
|
81 | 82 | searching for changes |
|
82 | 83 | 2 changesets found |
|
83 | 84 | $ hg --cwd a unbundle ../test.hg |
|
84 | 85 | adding changesets |
|
85 | 86 | adding manifests |
|
86 | 87 | adding file changes |
|
87 | 88 | added 2 changesets with 2 changes to 1 files |
|
88 | 89 | new changesets cb9a9f314b8b:ba677d0156c1 (2 drafts) |
|
89 | 90 | (run 'hg update' to get a working copy) |
|
90 | 91 | $ hg --cwd a rollback |
|
91 | 92 | repository tip rolled back to revision -1 (undo unbundle) |
|
92 | 93 | |
|
93 | 94 | unbundle with correct source |
|
94 | 95 | |
|
95 | 96 | $ hg --config notify.sources=unbundle --cwd a unbundle ../test.hg 2>&1 | |
|
97 | > "$PYTHON" $TESTDIR/unwrap-message-id.py | \ | |
|
96 | 98 | > "$PYTHON" -c 'from __future__ import print_function ; import sys,re; print(re.sub("\n\t", " ", sys.stdin.read()), end="")' |
|
97 | 99 | adding changesets |
|
98 | 100 | adding manifests |
|
99 | 101 | adding file changes |
|
100 | 102 | added 2 changesets with 2 changes to 1 files |
|
101 | 103 | new changesets cb9a9f314b8b:ba677d0156c1 (2 drafts) |
|
102 | 104 | MIME-Version: 1.0 |
|
103 | 105 | Content-Type: text/plain; charset="us-ascii" |
|
104 | 106 | Content-Transfer-Encoding: 7bit |
|
105 | 107 | Date: * (glob) |
|
106 | 108 | Subject: * (glob) |
|
107 | 109 | From: test |
|
108 | 110 | X-Hg-Notification: changeset cb9a9f314b8b |
|
109 | 111 | Message-Id: <*> (glob) |
|
110 | 112 | To: baz, foo@bar |
|
111 | 113 | |
|
112 | 114 | changeset cb9a9f314b8b in $TESTTMP/a |
|
113 | 115 | details: $TESTTMP/a?cmd=changeset;node=cb9a9f314b8b |
|
114 | 116 | summary: a |
|
115 | 117 | |
|
116 | 118 | changeset ba677d0156c1 in $TESTTMP/a |
|
117 | 119 | details: $TESTTMP/a?cmd=changeset;node=ba677d0156c1 |
|
118 | 120 | summary: b |
|
119 | 121 | |
|
120 | 122 | diffs (6 lines): |
|
121 | 123 | |
|
122 | 124 | diff -r 000000000000 -r ba677d0156c1 a |
|
123 | 125 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
124 | 126 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
125 | 127 | @@ -0,0 +1,2 @@ |
|
126 | 128 | +a |
|
127 | 129 | +a |
|
128 | 130 | (run 'hg update' to get a working copy) |
|
129 | 131 | |
|
130 | 132 | Check that using the first committer as the author of a changeset works: |
|
131 | 133 | Check that the config option works. |
|
132 | 134 | Check that the first committer is indeed used for "From:". |
|
133 | 135 | Check that the merge user is NOT used for "From:" |
|
134 | 136 | |
|
135 | 137 | Create new file |
|
136 | 138 | |
|
137 | 139 | $ echo a > b/b |
|
138 | 140 | $ echo b >> b/b |
|
139 | 141 | $ echo c >> b/b |
|
140 | 142 | $ hg --traceback --cwd b commit -Amnewfile -u committer_1 |
|
141 | 143 | adding b |
|
142 | 144 | |
|
143 | 145 | commit as one user |
|
144 | 146 | |
|
145 | 147 | $ echo x > b/b |
|
146 | 148 | $ echo b >> b/b |
|
147 | 149 | $ echo c >> b/b |
|
148 | 150 | $ hg --traceback --cwd b commit -Amx -u committer_2 |
|
149 | 151 | |
|
150 | 152 | commit as other user, change file so we can do an (automatic) merge |
|
151 | 153 | |
|
152 | 154 | $ hg --cwd b up 2 |
|
153 | 155 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
154 | 156 | $ echo a > b/b |
|
155 | 157 | $ echo b >> b/b |
|
156 | 158 | $ echo y >> b/b |
|
157 | 159 | $ hg --traceback --cwd b commit -Amy -u committer_3 |
|
158 | 160 | created new head |
|
159 | 161 | |
|
160 | 162 | merge as a different user |
|
161 | 163 | |
|
162 | 164 | $ hg --cwd b merge --config notify.fromauthor=True |
|
163 | 165 | merging b |
|
164 | 166 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
165 | 167 | (branch merge, don't forget to commit) |
|
166 | 168 | |
|
167 | 169 | $ hg --traceback --cwd b commit -Am "merged" |
|
168 | 170 | |
|
169 | 171 | push |
|
170 | 172 | |
|
171 | 173 | $ hg --traceback --cwd b --config notify.fromauthor=True push ../a 2>&1 | |
|
174 | > "$PYTHON" $TESTDIR/unwrap-message-id.py | \ | |
|
172 | 175 | > "$PYTHON" -c 'from __future__ import print_function ; import sys,re; print(re.sub("\n\t", " ", sys.stdin.read()), end="")' |
|
173 | 176 | pushing to ../a |
|
174 | 177 | searching for changes |
|
175 | 178 | adding changesets |
|
176 | 179 | adding manifests |
|
177 | 180 | adding file changes |
|
178 | 181 | added 4 changesets with 4 changes to 1 files |
|
179 | 182 | MIME-Version: 1.0 |
|
180 | 183 | Content-Type: text/plain; charset="us-ascii" |
|
181 | 184 | Content-Transfer-Encoding: 7bit |
|
182 | 185 | Date: * (glob) |
|
183 | 186 | Subject: * (glob) |
|
184 | 187 | From: committer_1 |
|
185 | 188 | X-Hg-Notification: changeset 84e487dddc58 |
|
186 | 189 | Message-Id: <*> (glob) |
|
187 | 190 | To: baz, foo@bar |
|
188 | 191 | |
|
189 | 192 | changeset 84e487dddc58 in $TESTTMP/a |
|
190 | 193 | details: $TESTTMP/a?cmd=changeset;node=84e487dddc58 |
|
191 | 194 | summary: newfile |
|
192 | 195 | |
|
193 | 196 | changeset b29c7a2b6b0c in $TESTTMP/a |
|
194 | 197 | details: $TESTTMP/a?cmd=changeset;node=b29c7a2b6b0c |
|
195 | 198 | summary: x |
|
196 | 199 | |
|
197 | 200 | changeset 0957c7d64886 in $TESTTMP/a |
|
198 | 201 | details: $TESTTMP/a?cmd=changeset;node=0957c7d64886 |
|
199 | 202 | summary: y |
|
200 | 203 | |
|
201 | 204 | changeset 485b4e6b0249 in $TESTTMP/a |
|
202 | 205 | details: $TESTTMP/a?cmd=changeset;node=485b4e6b0249 |
|
203 | 206 | summary: merged |
|
204 | 207 | |
|
205 | 208 | diffs (7 lines): |
|
206 | 209 | |
|
207 | 210 | diff -r ba677d0156c1 -r 485b4e6b0249 b |
|
208 | 211 | --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
209 | 212 | +++ b/b Thu Jan 01 00:00:00 1970 +0000 |
|
210 | 213 | @@ -0,0 +1,3 @@ |
|
211 | 214 | +x |
|
212 | 215 | +b |
|
213 | 216 | +y |
|
214 | 217 | $ hg --cwd a rollback |
|
215 | 218 | repository tip rolled back to revision 1 (undo push) |
|
216 | 219 |
General Comments 0
You need to be logged in to leave comments.
Login now