Show More
@@ -1,65 +1,69 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
|
3 | # adjust to non-default HGPORT, e.g. with run-tests.py -j | |||
|
4 | hideport() { sed "s/localhost:$HGPORT/localhost:20059/"; } | |||
|
5 | hidehash() { sed "s/changeset 3:............ merges/changeset 3:... merges/"; } | |||
|
6 | ||||
3 | echo "[extensions]" >> $HGRCPATH |
|
7 | echo "[extensions]" >> $HGRCPATH | |
4 | echo "fetch=" >> $HGRCPATH |
|
8 | echo "fetch=" >> $HGRCPATH | |
5 |
|
9 | |||
6 | hg init a |
|
10 | hg init a | |
7 | echo a > a/a |
|
11 | echo a > a/a | |
8 | hg --cwd a commit -d '1 0' -Ama |
|
12 | hg --cwd a commit -d '1 0' -Ama | |
9 |
|
13 | |||
10 | hg clone a b |
|
14 | hg clone a b | |
11 | hg clone a c |
|
15 | hg clone a c | |
12 |
|
16 | |||
13 | echo b > a/b |
|
17 | echo b > a/b | |
14 | hg --cwd a commit -d '2 0' -Amb |
|
18 | hg --cwd a commit -d '2 0' -Amb | |
15 | hg --cwd a parents -q |
|
19 | hg --cwd a parents -q | |
16 |
|
20 | |||
17 | echo % should pull one change |
|
21 | echo % should pull one change | |
18 | hg --cwd b fetch ../a |
|
22 | hg --cwd b fetch ../a | |
19 | hg --cwd b parents -q |
|
23 | hg --cwd b parents -q | |
20 |
|
24 | |||
21 | echo c > c/c |
|
25 | echo c > c/c | |
22 | hg --cwd c commit -d '3 0' -Amc |
|
26 | hg --cwd c commit -d '3 0' -Amc | |
23 |
|
27 | |||
24 | hg clone c d |
|
28 | hg clone c d | |
25 | hg clone c e |
|
29 | hg clone c e | |
26 |
|
30 | |||
27 | # We cannot use the default commit message if fetching from a local |
|
31 | # 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 |
|
32 | # repo, because the path of the repo will be included in the commit | |
29 | # message, making every commit appear different. |
|
33 | # message, making every commit appear different. | |
30 |
|
34 | |||
31 | echo % should merge c into a |
|
35 | echo % should merge c into a | |
32 | hg --cwd c fetch -d '4 0' -m 'automated merge' ../a |
|
36 | hg --cwd c fetch -d '4 0' -m 'automated merge' ../a | |
33 | ls c |
|
37 | ls c | |
34 |
|
38 | |||
35 | hg --cwd a serve -a localhost -p $HGPORT -d --pid-file=hg.pid |
|
39 | hg --cwd a serve -a localhost -p $HGPORT -d --pid-file=hg.pid | |
36 | cat a/hg.pid >> "$DAEMON_PIDS" |
|
40 | cat a/hg.pid >> "$DAEMON_PIDS" | |
37 |
|
41 | |||
38 | echo '% fetch over http, no auth' |
|
42 | echo '% fetch over http, no auth' | |
39 | hg --cwd d fetch -d '5 0' http://localhost:$HGPORT/ |
|
43 | hg --cwd d fetch -d '5 0' http://localhost:$HGPORT/ | hideport | hidehash | |
40 | hg --cwd d tip --template '{desc}\n' |
|
44 | hg --cwd d tip --template '{desc}\n' | hideport | |
41 |
|
45 | |||
42 | echo '% fetch over http with auth (should be hidden in desc)' |
|
46 | echo '% fetch over http with auth (should be hidden in desc)' | |
43 | hg --cwd e fetch -d '5 0' http://user:password@localhost:$HGPORT/ |
|
47 | hg --cwd e fetch -d '5 0' http://user:password@localhost:$HGPORT/ | hideport | hidehash | |
44 | hg --cwd e tip --template '{desc}\n' |
|
48 | hg --cwd e tip --template '{desc}\n' | hideport | |
45 |
|
49 | |||
46 | hg clone a f |
|
50 | hg clone a f | |
47 | hg clone a g |
|
51 | hg clone a g | |
48 |
|
52 | |||
49 | echo f > f/f |
|
53 | echo f > f/f | |
50 | hg --cwd f ci -d '6 0' -Amf |
|
54 | hg --cwd f ci -d '6 0' -Amf | |
51 |
|
55 | |||
52 | echo g > g/g |
|
56 | echo g > g/g | |
53 | hg --cwd g ci -d '6 0' -Amg |
|
57 | hg --cwd g ci -d '6 0' -Amg | |
54 |
|
58 | |||
55 | hg clone -q f h |
|
59 | hg clone -q f h | |
56 | hg clone -q g i |
|
60 | hg clone -q g i | |
57 |
|
61 | |||
58 | echo % should merge f into g |
|
62 | echo % should merge f into g | |
59 | hg --cwd g fetch -d '7 0' --switch -m 'automated merge' ../f |
|
63 | hg --cwd g fetch -d '7 0' --switch -m 'automated merge' ../f | |
60 |
|
64 | |||
61 | rm i/g |
|
65 | rm i/g | |
62 | echo % should abort, because i is modified |
|
66 | echo % should abort, because i is modified | |
63 | hg --cwd i fetch ../h |
|
67 | hg --cwd i fetch ../h | |
64 |
|
68 | |||
65 | true |
|
69 | true |
@@ -1,75 +1,75 b'' | |||||
1 | adding a |
|
1 | adding a | |
2 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
2 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
3 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
3 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
4 | adding b |
|
4 | adding b | |
5 | 1:97d72e5f12c7 |
|
5 | 1:97d72e5f12c7 | |
6 | % should pull one change |
|
6 | % should pull one change | |
7 | pulling from ../a |
|
7 | pulling from ../a | |
8 | searching for changes |
|
8 | searching for changes | |
9 | adding changesets |
|
9 | adding changesets | |
10 | adding manifests |
|
10 | adding manifests | |
11 | adding file changes |
|
11 | adding file changes | |
12 | added 1 changesets with 1 changes to 1 files |
|
12 | added 1 changesets with 1 changes to 1 files | |
13 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
13 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
14 | 1:97d72e5f12c7 |
|
14 | 1:97d72e5f12c7 | |
15 | adding c |
|
15 | adding c | |
16 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
16 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
17 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
17 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
18 | % should merge c into a |
|
18 | % should merge c into a | |
19 | pulling from ../a |
|
19 | pulling from ../a | |
20 | searching for changes |
|
20 | searching for changes | |
21 | adding changesets |
|
21 | adding changesets | |
22 | adding manifests |
|
22 | adding manifests | |
23 | adding file changes |
|
23 | adding file changes | |
24 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
24 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
25 | updating to 2:97d72e5f12c7 |
|
25 | updating to 2:97d72e5f12c7 | |
26 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
26 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
27 | merging with 1:5e056962225c |
|
27 | merging with 1:5e056962225c | |
28 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
28 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
29 | new changeset 3:cd3a41621cf0 merges remote changes with local |
|
29 | new changeset 3:cd3a41621cf0 merges remote changes with local | |
30 | a |
|
30 | a | |
31 | b |
|
31 | b | |
32 | c |
|
32 | c | |
33 | % fetch over http, no auth |
|
33 | % fetch over http, no auth | |
34 | pulling from http://localhost:20059/ |
|
34 | pulling from http://localhost:20059/ | |
35 | searching for changes |
|
35 | searching for changes | |
36 | adding changesets |
|
36 | adding changesets | |
37 | adding manifests |
|
37 | adding manifests | |
38 | adding file changes |
|
38 | adding file changes | |
39 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
39 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
40 | updating to 2:97d72e5f12c7 |
|
40 | updating to 2:97d72e5f12c7 | |
41 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
41 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
42 | merging with 1:5e056962225c |
|
42 | merging with 1:5e056962225c | |
43 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
43 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
44 |
new changeset 3: |
|
44 | new changeset 3:... merges remote changes with local | |
45 | Automated merge with http://localhost:20059/ |
|
45 | Automated merge with http://localhost:20059/ | |
46 | % fetch over http with auth (should be hidden in desc) |
|
46 | % fetch over http with auth (should be hidden in desc) | |
47 | pulling from http://user:***@localhost:20059/ |
|
47 | pulling from http://user:***@localhost:20059/ | |
48 | searching for changes |
|
48 | searching for changes | |
49 | adding changesets |
|
49 | adding changesets | |
50 | adding manifests |
|
50 | adding manifests | |
51 | adding file changes |
|
51 | adding file changes | |
52 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
52 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
53 | updating to 2:97d72e5f12c7 |
|
53 | updating to 2:97d72e5f12c7 | |
54 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
54 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
55 | merging with 1:5e056962225c |
|
55 | merging with 1:5e056962225c | |
56 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
56 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
57 |
new changeset 3: |
|
57 | new changeset 3:... merges remote changes with local | |
58 | Automated merge with http://localhost:20059/ |
|
58 | Automated merge with http://localhost:20059/ | |
59 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
59 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
60 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
60 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
61 | adding f |
|
61 | adding f | |
62 | adding g |
|
62 | adding g | |
63 | % should merge f into g |
|
63 | % should merge f into g | |
64 | pulling from ../f |
|
64 | pulling from ../f | |
65 | searching for changes |
|
65 | searching for changes | |
66 | adding changesets |
|
66 | adding changesets | |
67 | adding manifests |
|
67 | adding manifests | |
68 | adding file changes |
|
68 | adding file changes | |
69 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
69 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
70 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
70 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
71 | merging with 3:cc6a3744834d |
|
71 | merging with 3:cc6a3744834d | |
72 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
72 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
73 | new changeset 4:55aa4f32ec59 merges remote changes with local |
|
73 | new changeset 4:55aa4f32ec59 merges remote changes with local | |
74 | % should abort, because i is modified |
|
74 | % should abort, because i is modified | |
75 | abort: working directory is missing some files |
|
75 | abort: working directory is missing some files |
General Comments 0
You need to be logged in to leave comments.
Login now