Show More
@@ -1,208 +1,213 b'' | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | |
|
3 | cp "$TESTDIR"/printenv.py . | |
|
4 | ||
|
3 | 5 | # commit hooks can see env vars |
|
4 | 6 | hg init a |
|
5 | 7 | cd a |
|
6 | 8 | echo "[hooks]" > .hg/hgrc |
|
7 | echo 'commit = echo commit hook: n=$HG_NODE p1=$HG_PARENT1 p2=$HG_PARENT2' >> .hg/hgrc | |
|
8 |
echo 'commit.b = |
|
|
9 |
echo 'precommit = |
|
|
10 | echo 'pretxncommit = echo pretxncommit hook: n=$HG_NODE p1=$HG_PARENT1 p2=$HG_PARENT2; hg -q tip' >> .hg/hgrc | |
|
9 | echo 'commit = python ../printenv.py commit' >> .hg/hgrc | |
|
10 | echo 'commit.b = python ../printenv.py commit.b' >> .hg/hgrc | |
|
11 | echo 'precommit = python ../printenv.py precommit' >> .hg/hgrc | |
|
12 | echo 'pretxncommit = python ../printenv.py pretxncommit' >> .hg/hgrc | |
|
13 | echo 'pretxncommit.tip = hg -q tip' >> .hg/hgrc | |
|
11 | 14 | echo a > a |
|
12 | 15 | hg add a |
|
13 | 16 | hg commit -m a -d "1000000 0" |
|
14 | 17 | |
|
15 | 18 | hg clone . ../b |
|
16 | 19 | cd ../b |
|
17 | 20 | |
|
18 | 21 | # changegroup hooks can see env vars |
|
19 | 22 | echo '[hooks]' > .hg/hgrc |
|
20 |
echo 'prechangegroup = |
|
|
21 | echo 'changegroup = echo changegroup hook: n=$HG_NODE u=`echo $HG_URL | sed s,file:.*,file:,`' >> .hg/hgrc | |
|
22 | echo 'incoming = echo incoming hook: n=$HG_NODE u=`echo $HG_URL | sed s,file:.*,file:,`' >> .hg/hgrc | |
|
23 | echo 'prechangegroup = python ../printenv.py prechangegroup' >> .hg/hgrc | |
|
24 | echo 'changegroup = python ../printenv.py changegroup' >> .hg/hgrc | |
|
25 | echo 'incoming = python ../printenv.py incoming' >> .hg/hgrc | |
|
23 | 26 | |
|
24 | 27 | # pretxncommit and commit hooks can see both parents of merge |
|
25 | 28 | cd ../a |
|
26 | 29 | echo b >> a |
|
27 | 30 | hg commit -m a1 -d "1 0" |
|
28 | 31 | hg update -C 0 |
|
29 | 32 | echo b > b |
|
30 | 33 | hg add b |
|
31 | 34 | hg commit -m b -d '1 0' |
|
32 | 35 | hg merge 1 |
|
33 | 36 | hg commit -m merge -d '2 0' |
|
34 | 37 | |
|
35 | 38 | cd ../b |
|
36 | 39 | hg pull ../a |
|
37 | 40 | |
|
38 | 41 | # tag hooks can see env vars |
|
39 | 42 | cd ../a |
|
40 | echo 'pretag = echo pretag hook: t=$HG_TAG n=$HG_NODE l=$HG_LOCAL' >> .hg/hgrc | |
|
41 | echo 'tag = echo tag hook: t=$HG_TAG n=$HG_NODE l=$HG_LOCAL' >> .hg/hgrc | |
|
43 | echo 'pretag = python ../printenv.py pretag' >> .hg/hgrc | |
|
44 | echo 'tag = python ../printenv.py tag' >> .hg/hgrc | |
|
42 | 45 | hg tag -d '3 0' a |
|
43 | 46 | hg tag -l la |
|
44 | 47 | |
|
45 | 48 | # pretag hook can forbid tagging |
|
46 |
echo 'pretag.forbid = |
|
|
49 | echo 'pretag.forbid = python ../printenv.py pretag.forbid 1' >> .hg/hgrc | |
|
47 | 50 | hg tag -d '4 0' fa |
|
48 | 51 | hg tag -l fla |
|
49 | 52 | |
|
50 | 53 | # pretxncommit hook can see changeset, can roll back txn, changeset |
|
51 | 54 | # no more there after |
|
52 |
echo 'pretxncommit.forbid |
|
|
55 | echo 'pretxncommit.forbid0 = hg tip -q' >> .hg/hgrc | |
|
56 | echo 'pretxncommit.forbid1 = python ../printenv.py pretxncommit.forbid 1' >> .hg/hgrc | |
|
53 | 57 | echo z > z |
|
54 | 58 | hg add z |
|
55 | 59 | hg -q tip |
|
56 | 60 | hg commit -m 'fail' -d '4 0' |
|
57 | 61 | hg -q tip |
|
58 | 62 | |
|
59 | 63 | # precommit hook can prevent commit |
|
60 |
echo 'precommit.forbid = |
|
|
64 | echo 'precommit.forbid = python ../printenv.py precommit.forbid 1' >> .hg/hgrc | |
|
61 | 65 | hg commit -m 'fail' -d '4 0' |
|
62 | 66 | hg -q tip |
|
63 | 67 | |
|
64 | 68 | # preupdate hook can prevent update |
|
65 |
echo 'preupdate = |
|
|
69 | echo 'preupdate = python ../printenv.py preupdate' >> .hg/hgrc | |
|
66 | 70 | hg update 1 |
|
67 | 71 | |
|
68 | 72 | # update hook |
|
69 | echo 'update = echo update hook: p1=$HG_PARENT1 p2=$HG_PARENT2 err=$HG_ERROR' >> .hg/hgrc | |
|
73 | echo 'update = python ../printenv.py update' >> .hg/hgrc | |
|
70 | 74 | hg update |
|
71 | 75 | |
|
72 | 76 | # prechangegroup hook can prevent incoming changes |
|
73 | 77 | cd ../b |
|
74 | 78 | hg -q tip |
|
75 | 79 | echo '[hooks]' > .hg/hgrc |
|
76 |
echo 'prechangegroup.forbid = |
|
|
80 | echo 'prechangegroup.forbid = python ../printenv.py prechangegroup.forbid 1' >> .hg/hgrc | |
|
77 | 81 | hg pull ../a |
|
78 | 82 | |
|
79 | 83 | # pretxnchangegroup hook can see incoming changes, can roll back txn, |
|
80 | 84 | # incoming changes no longer there after |
|
81 | 85 | echo '[hooks]' > .hg/hgrc |
|
82 |
echo 'pretxnchangegroup.forbid = |
|
|
86 | echo 'pretxnchangegroup.forbid0 = hg tip -q' >> .hg/hgrc | |
|
87 | echo 'pretxnchangegroup.forbid1 = python ../printenv.py pretxnchangegroup.forbid 1' >> .hg/hgrc | |
|
83 | 88 | hg pull ../a |
|
84 | 89 | hg -q tip |
|
85 | 90 | |
|
86 | 91 | # outgoing hooks can see env vars |
|
87 | 92 | rm .hg/hgrc |
|
88 | 93 | echo '[hooks]' > ../a/.hg/hgrc |
|
89 |
echo 'preoutgoing = |
|
|
90 |
echo 'outgoing = |
|
|
94 | echo 'preoutgoing = python ../printenv.py preoutgoing' >> ../a/.hg/hgrc | |
|
95 | echo 'outgoing = python ../printenv.py outgoing' >> ../a/.hg/hgrc | |
|
91 | 96 | hg pull ../a |
|
92 | 97 | hg rollback |
|
93 | 98 | |
|
94 | 99 | # preoutgoing hook can prevent outgoing changes |
|
95 |
echo 'preoutgoing.forbid = |
|
|
100 | echo 'preoutgoing.forbid = python ../printenv.py preoutgoing.forbid 1' >> ../a/.hg/hgrc | |
|
96 | 101 | hg pull ../a |
|
97 | 102 | |
|
98 | 103 | cat > hooktests.py <<EOF |
|
99 | 104 | from mercurial import util |
|
100 | 105 | |
|
101 | 106 | uncallable = 0 |
|
102 | 107 | |
|
103 | 108 | def printargs(args): |
|
104 | 109 | args.pop('ui', None) |
|
105 | 110 | args.pop('repo', None) |
|
106 | 111 | a = list(args.items()) |
|
107 | 112 | a.sort() |
|
108 | 113 | print 'hook args:' |
|
109 | 114 | for k, v in a: |
|
110 | 115 | print ' ', k, v |
|
111 | 116 | |
|
112 | 117 | def passhook(**args): |
|
113 | 118 | printargs(args) |
|
114 | 119 | |
|
115 | 120 | def failhook(**args): |
|
116 | 121 | printargs(args) |
|
117 | 122 | return True |
|
118 | 123 | |
|
119 | 124 | class LocalException(Exception): |
|
120 | 125 | pass |
|
121 | 126 | |
|
122 | 127 | def raisehook(**args): |
|
123 | 128 | raise LocalException('exception from hook') |
|
124 | 129 | |
|
125 | 130 | def aborthook(**args): |
|
126 | 131 | raise util.Abort('raise abort from hook') |
|
127 | 132 | |
|
128 | 133 | def brokenhook(**args): |
|
129 | 134 | return 1 + {} |
|
130 | 135 | |
|
131 | 136 | class container: |
|
132 | 137 | unreachable = 1 |
|
133 | 138 | EOF |
|
134 | 139 | |
|
135 | 140 | echo '# test python hooks' |
|
136 | 141 | PYTHONPATH="`pwd`:$PYTHONPATH" |
|
137 | 142 | export PYTHONPATH |
|
138 | 143 | |
|
139 | 144 | echo '[hooks]' > ../a/.hg/hgrc |
|
140 | 145 | echo 'preoutgoing.broken = python:hooktests.brokenhook' >> ../a/.hg/hgrc |
|
141 | 146 | hg pull ../a 2>&1 | grep 'raised an exception' |
|
142 | 147 | |
|
143 | 148 | echo '[hooks]' > ../a/.hg/hgrc |
|
144 | 149 | echo 'preoutgoing.raise = python:hooktests.raisehook' >> ../a/.hg/hgrc |
|
145 | 150 | hg pull ../a 2>&1 | grep 'raised an exception' |
|
146 | 151 | |
|
147 | 152 | echo '[hooks]' > ../a/.hg/hgrc |
|
148 | 153 | echo 'preoutgoing.abort = python:hooktests.aborthook' >> ../a/.hg/hgrc |
|
149 | 154 | hg pull ../a |
|
150 | 155 | |
|
151 | 156 | echo '[hooks]' > ../a/.hg/hgrc |
|
152 | 157 | echo 'preoutgoing.fail = python:hooktests.failhook' >> ../a/.hg/hgrc |
|
153 | 158 | hg pull ../a |
|
154 | 159 | |
|
155 | 160 | echo '[hooks]' > ../a/.hg/hgrc |
|
156 | 161 | echo 'preoutgoing.uncallable = python:hooktests.uncallable' >> ../a/.hg/hgrc |
|
157 | 162 | hg pull ../a |
|
158 | 163 | |
|
159 | 164 | echo '[hooks]' > ../a/.hg/hgrc |
|
160 | 165 | echo 'preoutgoing.nohook = python:hooktests.nohook' >> ../a/.hg/hgrc |
|
161 | 166 | hg pull ../a |
|
162 | 167 | |
|
163 | 168 | echo '[hooks]' > ../a/.hg/hgrc |
|
164 | 169 | echo 'preoutgoing.nomodule = python:nomodule' >> ../a/.hg/hgrc |
|
165 | 170 | hg pull ../a |
|
166 | 171 | |
|
167 | 172 | echo '[hooks]' > ../a/.hg/hgrc |
|
168 | 173 | echo 'preoutgoing.badmodule = python:nomodule.nowhere' >> ../a/.hg/hgrc |
|
169 | 174 | hg pull ../a |
|
170 | 175 | |
|
171 | 176 | echo '[hooks]' > ../a/.hg/hgrc |
|
172 | 177 | echo 'preoutgoing.unreachable = python:hooktests.container.unreachable' >> ../a/.hg/hgrc |
|
173 | 178 | hg pull ../a |
|
174 | 179 | |
|
175 | 180 | echo '[hooks]' > ../a/.hg/hgrc |
|
176 | 181 | echo 'preoutgoing.pass = python:hooktests.passhook' >> ../a/.hg/hgrc |
|
177 | 182 | hg pull ../a |
|
178 | 183 | |
|
179 | 184 | echo '# make sure --traceback works' |
|
180 | 185 | echo '[hooks]' > .hg/hgrc |
|
181 | 186 | echo 'commit.abort = python:hooktests.aborthook' >> .hg/hgrc |
|
182 | 187 | |
|
183 | 188 | echo a >> a |
|
184 | 189 | hg --traceback commit -A -m a 2>&1 | grep '^Traceback' |
|
185 | 190 | |
|
186 | 191 | cd .. |
|
187 | 192 | hg init c |
|
188 | 193 | cd c |
|
189 | 194 | |
|
190 | 195 | cat > hookext.py <<EOF |
|
191 | 196 | def autohook(**args): |
|
192 | 197 | print "Automatically installed hook" |
|
193 | 198 | |
|
194 | 199 | def reposetup(ui, repo): |
|
195 | 200 | repo.ui.setconfig("hooks", "commit.auto", autohook) |
|
196 | 201 | EOF |
|
197 | 202 | echo '[extensions]' >> .hg/hgrc |
|
198 | 203 | echo 'hookext = hookext.py' >> .hg/hgrc |
|
199 | 204 | |
|
200 | 205 | touch foo |
|
201 | 206 | hg add foo |
|
202 | 207 | hg ci -m 'add foo' |
|
203 | 208 | echo >> foo |
|
204 | 209 | hg ci --debug -m 'change foo' | sed -e 's/ at .*>/>/' |
|
205 | 210 | |
|
206 | 211 | hg showconfig hooks | sed -e 's/ at .*>/>/' |
|
207 | 212 | |
|
208 | 213 | exit 0 |
@@ -1,145 +1,146 b'' | |||
|
1 |
precommit hook: |
|
|
2 |
pretxncommit hook: |
|
|
1 | precommit hook: HG_PARENT1=0000000000000000000000000000000000000000 HG_PARENT2= | |
|
2 | pretxncommit hook: HG_NODE=29b62aeb769fdf78d8d9c5f28b017f76d7ef824b HG_PARENT1=0000000000000000000000000000000000000000 HG_PARENT2= | |
|
3 | 3 | 0:29b62aeb769f |
|
4 |
commit hook: |
|
|
5 | commit hook b | |
|
4 | commit hook: HG_NODE=29b62aeb769fdf78d8d9c5f28b017f76d7ef824b HG_PARENT1=0000000000000000000000000000000000000000 HG_PARENT2= | |
|
5 | commit.b hook: HG_NODE=29b62aeb769fdf78d8d9c5f28b017f76d7ef824b HG_PARENT1=0000000000000000000000000000000000000000 HG_PARENT2= | |
|
6 | 6 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
7 |
precommit hook: |
|
|
8 |
pretxncommit hook: |
|
|
7 | precommit hook: HG_PARENT1=29b62aeb769fdf78d8d9c5f28b017f76d7ef824b HG_PARENT2= | |
|
8 | pretxncommit hook: HG_NODE=b702efe9688826e3a91283852b328b84dbf37bc2 HG_PARENT1=29b62aeb769fdf78d8d9c5f28b017f76d7ef824b HG_PARENT2= | |
|
9 | 9 | 1:b702efe96888 |
|
10 |
commit hook: |
|
|
11 | commit hook b | |
|
10 | commit hook: HG_NODE=b702efe9688826e3a91283852b328b84dbf37bc2 HG_PARENT1=29b62aeb769fdf78d8d9c5f28b017f76d7ef824b HG_PARENT2= | |
|
11 | commit.b hook: HG_NODE=b702efe9688826e3a91283852b328b84dbf37bc2 HG_PARENT1=29b62aeb769fdf78d8d9c5f28b017f76d7ef824b HG_PARENT2= | |
|
12 | 12 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
13 |
precommit hook: |
|
|
14 |
pretxncommit hook: |
|
|
13 | precommit hook: HG_PARENT1=29b62aeb769fdf78d8d9c5f28b017f76d7ef824b HG_PARENT2= | |
|
14 | pretxncommit hook: HG_NODE=1324a5531bac09b329c3845d35ae6a7526874edb HG_PARENT1=29b62aeb769fdf78d8d9c5f28b017f76d7ef824b HG_PARENT2= | |
|
15 | 15 | 2:1324a5531bac |
|
16 |
commit hook: |
|
|
17 | commit hook b | |
|
16 | commit hook: HG_NODE=1324a5531bac09b329c3845d35ae6a7526874edb HG_PARENT1=29b62aeb769fdf78d8d9c5f28b017f76d7ef824b HG_PARENT2= | |
|
17 | commit.b hook: HG_NODE=1324a5531bac09b329c3845d35ae6a7526874edb HG_PARENT1=29b62aeb769fdf78d8d9c5f28b017f76d7ef824b HG_PARENT2= | |
|
18 | 18 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
19 | 19 | (branch merge, don't forget to commit) |
|
20 |
precommit hook: |
|
|
21 |
pretxncommit hook: |
|
|
20 | precommit hook: HG_PARENT1=1324a5531bac09b329c3845d35ae6a7526874edb HG_PARENT2=b702efe9688826e3a91283852b328b84dbf37bc2 | |
|
21 | pretxncommit hook: HG_NODE=4c52fb2e402287dd5dc052090682536c8406c321 HG_PARENT1=1324a5531bac09b329c3845d35ae6a7526874edb HG_PARENT2=b702efe9688826e3a91283852b328b84dbf37bc2 | |
|
22 | 22 | 3:4c52fb2e4022 |
|
23 |
commit hook: |
|
|
24 | commit hook b | |
|
25 | prechangegroup hook: u=file: | |
|
26 |
changegroup hook: |
|
|
27 |
incoming hook: |
|
|
28 |
incoming hook: |
|
|
29 |
incoming hook: |
|
|
23 | commit hook: HG_NODE=4c52fb2e402287dd5dc052090682536c8406c321 HG_PARENT1=1324a5531bac09b329c3845d35ae6a7526874edb HG_PARENT2=b702efe9688826e3a91283852b328b84dbf37bc2 | |
|
24 | commit.b hook: HG_NODE=4c52fb2e402287dd5dc052090682536c8406c321 HG_PARENT1=1324a5531bac09b329c3845d35ae6a7526874edb HG_PARENT2=b702efe9688826e3a91283852b328b84dbf37bc2 | |
|
25 | prechangegroup hook: HG_SOURCE=pull HG_URL=file: | |
|
26 | changegroup hook: HG_NODE=b702efe9688826e3a91283852b328b84dbf37bc2 HG_SOURCE=pull HG_URL=file: | |
|
27 | incoming hook: HG_NODE=b702efe9688826e3a91283852b328b84dbf37bc2 HG_SOURCE=pull HG_URL=file: | |
|
28 | incoming hook: HG_NODE=1324a5531bac09b329c3845d35ae6a7526874edb HG_SOURCE=pull HG_URL=file: | |
|
29 | incoming hook: HG_NODE=4c52fb2e402287dd5dc052090682536c8406c321 HG_SOURCE=pull HG_URL=file: | |
|
30 | 30 | pulling from ../a |
|
31 | 31 | searching for changes |
|
32 | 32 | adding changesets |
|
33 | 33 | adding manifests |
|
34 | 34 | adding file changes |
|
35 | 35 | added 3 changesets with 2 changes to 2 files |
|
36 | 36 | (run 'hg update' to get a working copy) |
|
37 |
pretag hook: |
|
|
38 |
precommit hook: |
|
|
39 |
pretxncommit hook: |
|
|
37 | pretag hook: HG_LOCAL=0 HG_NODE=4c52fb2e402287dd5dc052090682536c8406c321 HG_TAG=a | |
|
38 | precommit hook: HG_PARENT1=4c52fb2e402287dd5dc052090682536c8406c321 HG_PARENT2= | |
|
39 | pretxncommit hook: HG_NODE=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_PARENT1=4c52fb2e402287dd5dc052090682536c8406c321 HG_PARENT2= | |
|
40 | 40 | 4:8ea2ef7ad3e8 |
|
41 |
commit hook: |
|
|
42 | commit hook b | |
|
43 |
tag hook: |
|
|
44 |
pretag hook: |
|
|
45 |
tag hook: |
|
|
46 |
pretag hook: |
|
|
47 | pretag.forbid hook | |
|
41 | commit hook: HG_NODE=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_PARENT1=4c52fb2e402287dd5dc052090682536c8406c321 HG_PARENT2= | |
|
42 | commit.b hook: HG_NODE=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_PARENT1=4c52fb2e402287dd5dc052090682536c8406c321 HG_PARENT2= | |
|
43 | tag hook: HG_LOCAL=0 HG_NODE=4c52fb2e402287dd5dc052090682536c8406c321 HG_TAG=a | |
|
44 | pretag hook: HG_LOCAL=1 HG_NODE=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_TAG=la | |
|
45 | tag hook: HG_LOCAL=1 HG_NODE=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_TAG=la | |
|
46 | pretag hook: HG_LOCAL=0 HG_NODE=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_TAG=fa | |
|
47 | pretag.forbid hook: HG_LOCAL=0 HG_NODE=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_TAG=fa | |
|
48 | 48 | abort: pretag.forbid hook exited with status 1 |
|
49 |
pretag hook: |
|
|
50 | pretag.forbid hook | |
|
49 | pretag hook: HG_LOCAL=1 HG_NODE=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_TAG=fla | |
|
50 | pretag.forbid hook: HG_LOCAL=1 HG_NODE=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_TAG=fla | |
|
51 | 51 | abort: pretag.forbid hook exited with status 1 |
|
52 | 52 | 4:8ea2ef7ad3e8 |
|
53 |
precommit hook: |
|
|
54 |
pretxncommit hook: |
|
|
53 | precommit hook: HG_PARENT1=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_PARENT2= | |
|
54 | pretxncommit hook: HG_NODE=fad284daf8c032148abaffcd745dafeceefceb61 HG_PARENT1=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_PARENT2= | |
|
55 | 55 | 5:fad284daf8c0 |
|
56 | pretxncommit.forbid hook: tip=5:fad284daf8c0 | |
|
57 | abort: pretxncommit.forbid hook exited with status 1 | |
|
56 | pretxncommit.forbid hook: HG_NODE=fad284daf8c032148abaffcd745dafeceefceb61 HG_PARENT1=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_PARENT2= | |
|
57 | abort: pretxncommit.forbid1 hook exited with status 1 | |
|
58 | 58 | transaction abort! |
|
59 | 59 | rollback completed |
|
60 | 60 | 4:8ea2ef7ad3e8 |
|
61 |
precommit hook: |
|
|
62 | precommit.forbid hook | |
|
61 | precommit hook: HG_PARENT1=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_PARENT2= | |
|
62 | precommit.forbid hook: HG_PARENT1=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_PARENT2= | |
|
63 | 63 | abort: precommit.forbid hook exited with status 1 |
|
64 | 64 | 4:8ea2ef7ad3e8 |
|
65 |
preupdate hook: |
|
|
65 | preupdate hook: HG_PARENT1=b702efe96888 HG_PARENT2= | |
|
66 | 66 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
67 |
preupdate hook: |
|
|
68 |
update hook: |
|
|
67 | preupdate hook: HG_PARENT1=8ea2ef7ad3e8 HG_PARENT2= | |
|
68 | update hook: HG_ERROR=0 HG_PARENT1=8ea2ef7ad3e8 HG_PARENT2= | |
|
69 | 69 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
70 | 70 | 3:4c52fb2e4022 |
|
71 | prechangegroup.forbid hook | |
|
71 | prechangegroup.forbid hook: HG_SOURCE=pull HG_URL=file: | |
|
72 | 72 | pulling from ../a |
|
73 | 73 | searching for changes |
|
74 | 74 | abort: prechangegroup.forbid hook exited with status 1 |
|
75 | pretxnchangegroup.forbid hook: tip=4:8ea2ef7ad3e8 | |
|
75 | 4:8ea2ef7ad3e8 | |
|
76 | pretxnchangegroup.forbid hook: HG_NODE=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_SOURCE=pull HG_URL=file: | |
|
76 | 77 | pulling from ../a |
|
77 | 78 | searching for changes |
|
78 | 79 | adding changesets |
|
79 | 80 | adding manifests |
|
80 | 81 | adding file changes |
|
81 | 82 | added 1 changesets with 1 changes to 1 files |
|
82 | abort: pretxnchangegroup.forbid hook exited with status 1 | |
|
83 | abort: pretxnchangegroup.forbid1 hook exited with status 1 | |
|
83 | 84 | transaction abort! |
|
84 | 85 | rollback completed |
|
85 | 86 | 3:4c52fb2e4022 |
|
86 |
preoutgoing hook: |
|
|
87 |
outgoing hook: |
|
|
87 | preoutgoing hook: HG_SOURCE=pull | |
|
88 | outgoing hook: HG_NODE=8ea2ef7ad3e8cac946c72f1e0c79d6aebc301198 HG_SOURCE=pull | |
|
88 | 89 | pulling from ../a |
|
89 | 90 | searching for changes |
|
90 | 91 | adding changesets |
|
91 | 92 | adding manifests |
|
92 | 93 | adding file changes |
|
93 | 94 | added 1 changesets with 1 changes to 1 files |
|
94 | 95 | (run 'hg update' to get a working copy) |
|
95 | 96 | rolling back last transaction |
|
96 |
preoutgoing hook: |
|
|
97 | preoutgoing.forbid hook | |
|
97 | preoutgoing hook: HG_SOURCE=pull | |
|
98 | preoutgoing.forbid hook: HG_SOURCE=pull | |
|
98 | 99 | pulling from ../a |
|
99 | 100 | searching for changes |
|
100 | 101 | abort: preoutgoing.forbid hook exited with status 1 |
|
101 | 102 | # test python hooks |
|
102 | 103 | error: preoutgoing.broken hook raised an exception: unsupported operand type(s) for +: 'int' and 'dict' |
|
103 | 104 | error: preoutgoing.raise hook raised an exception: exception from hook |
|
104 | 105 | pulling from ../a |
|
105 | 106 | searching for changes |
|
106 | 107 | error: preoutgoing.abort hook failed: raise abort from hook |
|
107 | 108 | abort: raise abort from hook |
|
108 | 109 | pulling from ../a |
|
109 | 110 | searching for changes |
|
110 | 111 | hook args: |
|
111 | 112 | hooktype preoutgoing |
|
112 | 113 | source pull |
|
113 | 114 | abort: preoutgoing.fail hook failed |
|
114 | 115 | pulling from ../a |
|
115 | 116 | searching for changes |
|
116 | 117 | abort: preoutgoing.uncallable hook is invalid ("hooktests.uncallable" is not callable) |
|
117 | 118 | pulling from ../a |
|
118 | 119 | searching for changes |
|
119 | 120 | abort: preoutgoing.nohook hook is invalid ("hooktests.nohook" is not defined) |
|
120 | 121 | pulling from ../a |
|
121 | 122 | searching for changes |
|
122 | 123 | abort: preoutgoing.nomodule hook is invalid ("nomodule" not in a module) |
|
123 | 124 | pulling from ../a |
|
124 | 125 | searching for changes |
|
125 | 126 | abort: preoutgoing.badmodule hook is invalid (import of "nomodule" failed) |
|
126 | 127 | pulling from ../a |
|
127 | 128 | searching for changes |
|
128 | 129 | abort: preoutgoing.unreachable hook is invalid (import of "hooktests.container" failed) |
|
129 | 130 | pulling from ../a |
|
130 | 131 | searching for changes |
|
131 | 132 | hook args: |
|
132 | 133 | hooktype preoutgoing |
|
133 | 134 | source pull |
|
134 | 135 | adding changesets |
|
135 | 136 | adding manifests |
|
136 | 137 | adding file changes |
|
137 | 138 | added 1 changesets with 1 changes to 1 files |
|
138 | 139 | (run 'hg update' to get a working copy) |
|
139 | 140 | # make sure --traceback works |
|
140 | 141 | Traceback (most recent call last): |
|
141 | 142 | Automatically installed hook |
|
142 | 143 | foo |
|
143 | 144 | calling hook commit.auto: <function autohook> |
|
144 | 145 | Automatically installed hook |
|
145 | 146 | hooks.commit.auto=<function autohook> |
General Comments 0
You need to be logged in to leave comments.
Login now