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