Mercurial > hg > mercurial-crew-with-dirclash
comparison tests/test-hook @ 4364:97962a3e73cf
Work around problem where 'del os.environ["FOO"]' doesn't update environment.
test-hook failed since changeset 949516072388 because of this on Solaris 8.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Thu, 19 Apr 2007 13:04:26 +0200 |
parents | 949516072388 |
children | e6d105a51ec7 |
comparison
equal
deleted
inserted
replaced
4363:c6413f8f2f8e | 4364:97962a3e73cf |
---|---|
4 | 4 |
5 # commit hooks can see env vars | 5 # commit hooks can see env vars |
6 hg init a | 6 hg init a |
7 cd a | 7 cd a |
8 echo "[hooks]" > .hg/hgrc | 8 echo "[hooks]" > .hg/hgrc |
9 echo 'commit = python ../printenv.py commit' >> .hg/hgrc | 9 echo 'commit = unset HG_LOCAL HG_TAG; python ../printenv.py commit' >> .hg/hgrc |
10 echo 'commit.b = python ../printenv.py commit.b' >> .hg/hgrc | 10 echo 'commit.b = unset HG_LOCAL HG_TAG; python ../printenv.py commit.b' >> .hg/hgrc |
11 echo 'precommit = python ../printenv.py precommit' >> .hg/hgrc | 11 echo 'precommit = unset HG_LOCAL HG_NODE HG_TAG; python ../printenv.py precommit' >> .hg/hgrc |
12 echo 'pretxncommit = python ../printenv.py pretxncommit' >> .hg/hgrc | 12 echo 'pretxncommit = unset HG_LOCAL HG_TAG; python ../printenv.py pretxncommit' >> .hg/hgrc |
13 echo 'pretxncommit.tip = hg -q tip' >> .hg/hgrc | 13 echo 'pretxncommit.tip = hg -q tip' >> .hg/hgrc |
14 echo a > a | 14 echo a > a |
15 hg add a | 15 hg add a |
16 hg commit -m a -d "1000000 0" | 16 hg commit -m a -d "1000000 0" |
17 | 17 |
39 hg pull ../a | 39 hg pull ../a |
40 | 40 |
41 # tag hooks can see env vars | 41 # tag hooks can see env vars |
42 cd ../a | 42 cd ../a |
43 echo 'pretag = python ../printenv.py pretag' >> .hg/hgrc | 43 echo 'pretag = python ../printenv.py pretag' >> .hg/hgrc |
44 echo 'tag = python ../printenv.py tag' >> .hg/hgrc | 44 echo 'tag = unset HG_PARENT1 HG_PARENT2; python ../printenv.py tag' >> .hg/hgrc |
45 hg tag -d '3 0' a | 45 hg tag -d '3 0' a |
46 hg tag -l la | 46 hg tag -l la |
47 | 47 |
48 # pretag hook can forbid tagging | 48 # pretag hook can forbid tagging |
49 echo 'pretag.forbid = python ../printenv.py pretag.forbid 1' >> .hg/hgrc | 49 echo 'pretag.forbid = python ../printenv.py pretag.forbid 1' >> .hg/hgrc |