Show More
@@ -1,63 +1,65 | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | echo "[extensions]" >> $HGRCPATH |
|
3 | echo "[extensions]" >> $HGRCPATH | |
4 | echo "fetch=" >> $HGRCPATH |
|
4 | echo "fetch=" >> $HGRCPATH | |
5 |
|
5 | |||
6 | hg init a |
|
6 | hg init a | |
7 | echo a > a/a |
|
7 | echo a > a/a | |
8 | hg --cwd a commit -d '1 0' -Ama |
|
8 | hg --cwd a commit -d '1 0' -Ama | |
9 |
|
9 | |||
10 | hg clone a b |
|
10 | hg clone a b | |
11 | hg clone a c |
|
11 | hg clone a c | |
12 |
|
12 | |||
13 | echo b > a/b |
|
13 | echo b > a/b | |
14 | hg --cwd a commit -d '2 0' -Amb |
|
14 | hg --cwd a commit -d '2 0' -Amb | |
15 | hg --cwd a parents -q |
|
15 | hg --cwd a parents -q | |
16 |
|
16 | |||
17 | echo % should pull one change |
|
17 | echo % should pull one change | |
18 | hg --cwd b fetch ../a |
|
18 | hg --cwd b fetch ../a | |
19 | hg --cwd b parents -q |
|
19 | hg --cwd b parents -q | |
20 |
|
20 | |||
21 | echo c > c/c |
|
21 | echo c > c/c | |
22 | hg --cwd c commit -d '3 0' -Amc |
|
22 | hg --cwd c commit -d '3 0' -Amc | |
23 |
|
23 | |||
24 | hg clone c d |
|
24 | hg clone c d | |
25 | hg clone c e |
|
25 | hg clone c e | |
26 |
|
26 | |||
27 | # We cannot use the default commit message if fetching from a local |
|
27 | # We cannot use the default commit message if fetching from a local | |
28 | # repo, because the path of the repo will be included in the commit |
|
28 | # repo, because the path of the repo will be included in the commit | |
29 | # message, making every commit appear different. |
|
29 | # message, making every commit appear different. | |
30 |
|
30 | |||
31 | echo % should merge c into a |
|
31 | echo % should merge c into a | |
32 | hg --cwd c fetch -d '4 0' -m 'automated merge' ../a |
|
32 | hg --cwd c fetch -d '4 0' -m 'automated merge' ../a | |
33 | ls c |
|
33 | ls c | |
34 |
|
34 | |||
35 | hg --cwd a serve -a localhost -p $HGPORT -d --pid-file=hg.pid |
|
35 | hg --cwd a serve -a localhost -p $HGPORT -d --pid-file=hg.pid | |
36 | cat a/hg.pid >> "$DAEMON_PIDS" |
|
36 | cat a/hg.pid >> "$DAEMON_PIDS" | |
37 |
|
37 | |||
38 | echo '% fetch over http, no auth' |
|
38 | echo '% fetch over http, no auth' | |
39 | hg --cwd d fetch -d '5 0' http://localhost:$HGPORT/ |
|
39 | hg --cwd d fetch -d '5 0' http://localhost:$HGPORT/ | |
40 | hg --cwd d tip --template '{desc}\n' |
|
40 | hg --cwd d tip --template '{desc}\n' | |
41 |
|
41 | |||
42 | echo '% fetch over http with auth (should be hidden in desc)' |
|
42 | echo '% fetch over http with auth (should be hidden in desc)' | |
43 | hg --cwd e fetch -d '5 0' http://user:password@localhost:$HGPORT/ |
|
43 | hg --cwd e fetch -d '5 0' http://user:password@localhost:$HGPORT/ | |
44 | hg --cwd e tip --template '{desc}\n' |
|
44 | hg --cwd e tip --template '{desc}\n' | |
45 |
|
45 | |||
46 | hg clone a f |
|
46 | hg clone a f | |
47 | hg clone a g |
|
47 | hg clone a g | |
48 |
|
48 | |||
49 | echo f > f/f |
|
49 | echo f > f/f | |
50 | hg --cwd f ci -d '6 0' -Amf |
|
50 | hg --cwd f ci -d '6 0' -Amf | |
51 |
|
51 | |||
52 | echo g > g/g |
|
52 | echo g > g/g | |
53 | hg --cwd g ci -d '6 0' -Amg |
|
53 | hg --cwd g ci -d '6 0' -Amg | |
54 |
|
54 | |||
55 | hg clone -q f h |
|
55 | hg clone -q f h | |
56 | hg clone -q g i |
|
56 | hg clone -q g i | |
57 |
|
57 | |||
58 | echo % should merge f into g |
|
58 | echo % should merge f into g | |
59 | hg --cwd g fetch -d '7 0' --switch -m 'automated merge' ../f |
|
59 | hg --cwd g fetch -d '7 0' --switch -m 'automated merge' ../f | |
60 |
|
60 | |||
61 | rm i/g |
|
61 | rm i/g | |
62 | echo % should abort, because i is modified |
|
62 | echo % should abort, because i is modified | |
63 | hg --cwd i fetch ../h |
|
63 | hg --cwd i fetch ../h | |
|
64 | ||||
|
65 | true |
General Comments 0
You need to be logged in to leave comments.
Login now