annotate tests/test-fetch @ 6235:d16798000be0

test-fetch failed due to non-zero exit code
author Thomas Arendsen Hein <thomas@intevation.de>
date Wed, 12 Mar 2008 09:04:20 +0100
parents bd61e44eb2cc
children 35bf9c23e17a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2822
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
1 #!/bin/sh
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
2
2990
61fcd9fac434 Make tests append settings to $HGRCPATH instead of $HGTMP/.hgrc
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2823
diff changeset
3 echo "[extensions]" >> $HGRCPATH
61fcd9fac434 Make tests append settings to $HGRCPATH instead of $HGTMP/.hgrc
Thomas Arendsen Hein <thomas@intevation.de>
parents: 2823
diff changeset
4 echo "fetch=" >> $HGRCPATH
2822
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
5
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
6 hg init a
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
7 echo a > a/a
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
8 hg --cwd a commit -d '1 0' -Ama
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
9
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
10 hg clone a b
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
11 hg clone a c
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
12
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
13 echo b > a/b
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
14 hg --cwd a commit -d '2 0' -Amb
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
15 hg --cwd a parents -q
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
16
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
17 echo % should pull one change
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
18 hg --cwd b fetch ../a
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
19 hg --cwd b parents -q
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
20
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
21 echo c > c/c
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
22 hg --cwd c commit -d '3 0' -Amc
5798
86f5d8f608b7 fetch: hide authentication details
Bryan O'Sullivan <bos@serpentine.com>
parents: 2990
diff changeset
23
86f5d8f608b7 fetch: hide authentication details
Bryan O'Sullivan <bos@serpentine.com>
parents: 2990
diff changeset
24 hg clone c d
86f5d8f608b7 fetch: hide authentication details
Bryan O'Sullivan <bos@serpentine.com>
parents: 2990
diff changeset
25 hg clone c e
86f5d8f608b7 fetch: hide authentication details
Bryan O'Sullivan <bos@serpentine.com>
parents: 2990
diff changeset
26
6207
03b13d853dc6 fetch: make test reproducible, tiny code cleanup
Bryan O'Sullivan <bos@serpentine.com>
parents: 6206
diff changeset
27 # We cannot use the default commit message if fetching from a local
03b13d853dc6 fetch: make test reproducible, tiny code cleanup
Bryan O'Sullivan <bos@serpentine.com>
parents: 6206
diff changeset
28 # repo, because the path of the repo will be included in the commit
03b13d853dc6 fetch: make test reproducible, tiny code cleanup
Bryan O'Sullivan <bos@serpentine.com>
parents: 6206
diff changeset
29 # message, making every commit appear different.
03b13d853dc6 fetch: make test reproducible, tiny code cleanup
Bryan O'Sullivan <bos@serpentine.com>
parents: 6206
diff changeset
30
6206
0b6f12495276 fetch: switch the default parent used for a merge
Bryan O'Sullivan <bos@serpentine.com>
parents: 5798
diff changeset
31 echo % should merge c into a
2823
e0caea53c997 test-fetch: make output stable
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 2822
diff changeset
32 hg --cwd c fetch -d '4 0' -m 'automated merge' ../a
2822
4f7abf341cd4 fetch: fix breakage from mpm.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
33 ls c
5798
86f5d8f608b7 fetch: hide authentication details
Bryan O'Sullivan <bos@serpentine.com>
parents: 2990
diff changeset
34
86f5d8f608b7 fetch: hide authentication details
Bryan O'Sullivan <bos@serpentine.com>
parents: 2990
diff changeset
35 hg --cwd a serve -a localhost -p $HGPORT -d --pid-file=hg.pid
86f5d8f608b7 fetch: hide authentication details
Bryan O'Sullivan <bos@serpentine.com>
parents: 2990
diff changeset
36 cat a/hg.pid >> "$DAEMON_PIDS"
86f5d8f608b7 fetch: hide authentication details
Bryan O'Sullivan <bos@serpentine.com>
parents: 2990
diff changeset
37
86f5d8f608b7 fetch: hide authentication details
Bryan O'Sullivan <bos@serpentine.com>
parents: 2990
diff changeset
38 echo '% fetch over http, no auth'
86f5d8f608b7 fetch: hide authentication details
Bryan O'Sullivan <bos@serpentine.com>
parents: 2990
diff changeset
39 hg --cwd d fetch -d '5 0' http://localhost:$HGPORT/
86f5d8f608b7 fetch: hide authentication details
Bryan O'Sullivan <bos@serpentine.com>
parents: 2990
diff changeset
40 hg --cwd d tip --template '{desc}\n'
86f5d8f608b7 fetch: hide authentication details
Bryan O'Sullivan <bos@serpentine.com>
parents: 2990
diff changeset
41
86f5d8f608b7 fetch: hide authentication details
Bryan O'Sullivan <bos@serpentine.com>
parents: 2990
diff changeset
42 echo '% fetch over http with auth (should be hidden in desc)'
86f5d8f608b7 fetch: hide authentication details
Bryan O'Sullivan <bos@serpentine.com>
parents: 2990
diff changeset
43 hg --cwd e fetch -d '5 0' http://user:password@localhost:$HGPORT/
86f5d8f608b7 fetch: hide authentication details
Bryan O'Sullivan <bos@serpentine.com>
parents: 2990
diff changeset
44 hg --cwd e tip --template '{desc}\n'
6206
0b6f12495276 fetch: switch the default parent used for a merge
Bryan O'Sullivan <bos@serpentine.com>
parents: 5798
diff changeset
45
0b6f12495276 fetch: switch the default parent used for a merge
Bryan O'Sullivan <bos@serpentine.com>
parents: 5798
diff changeset
46 hg clone a f
0b6f12495276 fetch: switch the default parent used for a merge
Bryan O'Sullivan <bos@serpentine.com>
parents: 5798
diff changeset
47 hg clone a g
0b6f12495276 fetch: switch the default parent used for a merge
Bryan O'Sullivan <bos@serpentine.com>
parents: 5798
diff changeset
48
0b6f12495276 fetch: switch the default parent used for a merge
Bryan O'Sullivan <bos@serpentine.com>
parents: 5798
diff changeset
49 echo f > f/f
0b6f12495276 fetch: switch the default parent used for a merge
Bryan O'Sullivan <bos@serpentine.com>
parents: 5798
diff changeset
50 hg --cwd f ci -d '6 0' -Amf
0b6f12495276 fetch: switch the default parent used for a merge
Bryan O'Sullivan <bos@serpentine.com>
parents: 5798
diff changeset
51
0b6f12495276 fetch: switch the default parent used for a merge
Bryan O'Sullivan <bos@serpentine.com>
parents: 5798
diff changeset
52 echo g > g/g
0b6f12495276 fetch: switch the default parent used for a merge
Bryan O'Sullivan <bos@serpentine.com>
parents: 5798
diff changeset
53 hg --cwd g ci -d '6 0' -Amg
0b6f12495276 fetch: switch the default parent used for a merge
Bryan O'Sullivan <bos@serpentine.com>
parents: 5798
diff changeset
54
6226
bd61e44eb2cc fetch: don't proceed if working directory is missing files (issue988)
Bryan O'Sullivan <bos@serpentine.com>
parents: 6207
diff changeset
55 hg clone -q f h
bd61e44eb2cc fetch: don't proceed if working directory is missing files (issue988)
Bryan O'Sullivan <bos@serpentine.com>
parents: 6207
diff changeset
56 hg clone -q g i
bd61e44eb2cc fetch: don't proceed if working directory is missing files (issue988)
Bryan O'Sullivan <bos@serpentine.com>
parents: 6207
diff changeset
57
6206
0b6f12495276 fetch: switch the default parent used for a merge
Bryan O'Sullivan <bos@serpentine.com>
parents: 5798
diff changeset
58 echo % should merge f into g
6207
03b13d853dc6 fetch: make test reproducible, tiny code cleanup
Bryan O'Sullivan <bos@serpentine.com>
parents: 6206
diff changeset
59 hg --cwd g fetch -d '7 0' --switch -m 'automated merge' ../f
6226
bd61e44eb2cc fetch: don't proceed if working directory is missing files (issue988)
Bryan O'Sullivan <bos@serpentine.com>
parents: 6207
diff changeset
60
bd61e44eb2cc fetch: don't proceed if working directory is missing files (issue988)
Bryan O'Sullivan <bos@serpentine.com>
parents: 6207
diff changeset
61 rm i/g
bd61e44eb2cc fetch: don't proceed if working directory is missing files (issue988)
Bryan O'Sullivan <bos@serpentine.com>
parents: 6207
diff changeset
62 echo % should abort, because i is modified
bd61e44eb2cc fetch: don't proceed if working directory is missing files (issue988)
Bryan O'Sullivan <bos@serpentine.com>
parents: 6207
diff changeset
63 hg --cwd i fetch ../h
6235
d16798000be0 test-fetch failed due to non-zero exit code
Thomas Arendsen Hein <thomas@intevation.de>
parents: 6226
diff changeset
64
d16798000be0 test-fetch failed due to non-zero exit code
Thomas Arendsen Hein <thomas@intevation.de>
parents: 6226
diff changeset
65 true