Debian Codegraph @

tests/test-hooklib-changeset_published.t

raw
1 $ cat <<EOF >> $HGRCPATH
2 > [extensions]
3 > notify =
4 > hooklib =
5 >
6 > [phases]
7 > publish = False
8 >
9 > [notify]
10 > sources = pull
11 > diffstat = False
12 > messageidseed = example
13 > domain = example.com
14 >
15 > [reposubs]
16 > * = baz
17 > EOF
18 $ hg init a
19 $ hg --cwd a debugbuilddag .
20 $ hg init b
21 $ cat <<EOF >> b/.hg/hgrc
22 > [hooks]
23 > incoming.notify = python:hgext.notify.hook
24 > txnclose-phase.changeset_published = python:hgext.hooklib.changeset_published.hook
25 > EOF
26 $ hg --cwd b pull ../a | "$PYTHON" $TESTDIR/unwrap-message-id.py
27 pulling from ../a
28 requesting all changes
29 adding changesets
30 adding manifests
31 adding file changes
32 added 1 changesets with 0 changes to 0 files
33 new changesets 1ea73414a91b (1 drafts)
34 MIME-Version: 1.0
35 Content-Type: text/plain; charset="us-ascii"
36 Content-Transfer-Encoding: 7bit
37 Date: * (glob)
38 Subject: changeset in * (glob)
39 From: [email protected]
40 X-Hg-Notification: changeset 1ea73414a91b
41 Message-Id: <hg.81c297828fd2d5afaadf2775a6a71b74143b6451dfaac09fac939e9107a50d01@example.com>
42 To: [email protected]
43
44 changeset 1ea73414a91b in $TESTTMP/b
45 details: $TESTTMP/b?cmd=changeset;node=1ea73414a91b
46 description:
47 r0
48 (run 'hg update' to get a working copy)
49 $ hg --cwd a phase --public 0
50 $ hg --cwd b pull ../a | "$PYTHON" $TESTDIR/unwrap-message-id.py
51 pulling from ../a
52 searching for changes
53 no changes found
54 1 local changesets published
55 Subject: changeset published
56 In-reply-to: <hg.81c297828fd2d5afaadf2775a6a71b74143b6451dfaac09fac939e9107a50d01@example.com>
57 Message-Id: <hg.2ec19bbddee5b542442bf5e1aed97bf706afff6aa765629883fbd1f4edd6fcb0@example.com>
58 Date: * (glob)
59 From: [email protected]
60 To: [email protected]
61
62 This changeset has been published.
63 $ hg --cwd b phase --force --draft 0
64 $ cat <<EOF >> b/.hg/hgrc
65 > [notify_published]
66 > messageidseed = example2
67 > domain = alt.example.com
68 > template = Subject: changeset published
69 > From: [email protected]\n
70 > This draft changeset has been published.\n
71 > EOF
72 $ hg --cwd b pull ../a | "$PYTHON" $TESTDIR/unwrap-message-id.py
73 pulling from ../a
74 searching for changes
75 no changes found
76 1 local changesets published
77 Subject: changeset published
78 From: [email protected]
79 In-reply-to: <hg.e3381dc41c051215e50b1c166a72949d0fff99609eb373420bcb763af80ef230@alt.example.com>
80 Message-Id: <hg.c927f3d324e645a4245bfed20b0efb5b9582999d6be9bef45a37e7ec21208b24@alt.example.com>
81 Date: * (glob)
82 To: [email protected]
83
84 This draft changeset has been published.