##// END OF EJS Templates
tests: fix inadvertent use of existing test repository
Henrik Stuart -
r9609:aa404f3f default
parent child Browse files
Show More
@@ -1,143 +1,143
1 1 #!/bin/sh
2 2
3 3 mkdir a
4 4 cd a
5 5 hg init
6 6 echo foo > t1
7 7 hg add t1
8 8 hg commit -m "1" -d "1000000 0"
9 9
10 10 cd ..
11 11 hg clone a b
12 12
13 13 cd a
14 14 echo foo > t2
15 15 hg add t2
16 16 hg commit -m "2" -d "1000000 0"
17 17
18 18 cd ../b
19 19 echo foo > t3
20 20 hg add t3
21 21 hg commit -m "3" -d "1000000 0"
22 22
23 23 hg push ../a
24 24 hg pull ../a
25 25 hg push ../a
26 26 hg merge
27 27 hg commit -m "4" -d "1000000 0"
28 28 hg push ../a
29 29 cd ..
30 30
31 31 hg init c
32 32 cd c
33 33 for i in 0 1 2; do
34 34 echo $i >> foo
35 35 hg ci -Am $i -d "1000000 0"
36 36 done
37 37 cd ..
38 38
39 39 hg clone c d
40 40 cd d
41 41 for i in 0 1; do
42 42 hg co -C $i
43 43 echo d-$i >> foo
44 44 hg ci -m d-$i -d "1000000 0"
45 45 done
46 46
47 47 HGMERGE=true hg merge 3
48 48 hg ci -m c-d -d "1000000 0"
49 49
50 50 hg push ../c; echo $?
51 51 hg push -r 2 ../c; echo $?
52 52 hg push -r 3 ../c; echo $?
53 53 hg push -r 3 -r 4 ../c; echo $?
54 54 hg push -f -r 3 -r 4 ../c; echo $?
55 55 hg push -r 5 ../c; echo $?
56 56
57 57 # issue 450
58 58 hg init ../e
59 59 hg push -r 0 ../e ; echo $?
60 60 hg push -r 1 ../e ; echo $?
61 61
62 62 cd ..
63 63
64 64 # issue 736
65 65 echo % issue 736
66 66 hg init f
67 67 cd f
68 68 hg -q branch a
69 69 echo 0 > foo
70 70 hg -q ci -d "1000000 0" -Am 0
71 71 echo 1 > foo
72 72 hg -q ci -d "1000000 0" -m 1
73 73 hg -q up 0
74 74 echo 2 > foo
75 75 hg -q ci -d "1000000 0" -m 2
76 76 hg -q up 0
77 77 hg -q branch b
78 78 echo 3 > foo
79 79 hg -q ci -d "1000000 0" -m 3
80 80 cd ..
81 81
82 82 hg -q clone f g
83 83 cd g
84 84
85 85 echo % push on existing branch and new branch
86 86 hg -q up 1
87 87 echo 4 > foo
88 88 hg -q ci -d "1000000 0" -m 4
89 89 hg -q up 0
90 90 echo 5 > foo
91 91 hg -q branch c
92 92 hg -q ci -d "1000000 0" -m 5
93 93 hg push -r 4 -r 5 ../f; echo $?
94 94
95 95 echo % fail on multiple head push
96 96 hg -q up 1
97 97 echo 6 > foo
98 98 hg -q ci -d "1000000 0" -m 6
99 99 hg push -r 4 -r 6 ../f; echo $?
100 100
101 101 echo % push replacement head on existing branches
102 102 hg -q up 3
103 103 echo 7 > foo
104 104 hg -q ci -d "1000000 0" -m 7
105 105 hg push -r 6 -r 7 ../f; echo $?
106 106
107 107 echo % merge of branch a to other branch b followed by unrelated push on branch a
108 108 hg -q up 6
109 109 HGMERGE=true hg -q merge 7
110 110 hg -q ci -d "1000000 0" -m 8
111 111 hg -q up 7
112 112 echo 9 > foo
113 113 hg -q ci -d "1000000 0" -m 9
114 114 hg push -r 8 ../f; echo $?
115 115 hg push -r 9 ../f; echo $?
116 116
117 117 echo % cheating the counting algorithm
118 118 hg -q up 8
119 119 HGMERGE=true hg -q merge 2
120 120 hg -q ci -d "1000000 0" -m 10
121 121 hg -q up 1
122 122 echo 11 > foo
123 123 hg -q ci -d "1000000 0" -m 11
124 124 hg push -r 10 -r 11 ../f; echo $?
125 125
126 126 echo % checking prepush logic does not allow silently pushing multiple new heads
127 127 cd ..
128 hg init g
129 echo init > g/init
130 hg -R g ci -Am init
131 echo a > g/a
132 hg -R g ci -Am a
133 hg clone g h
134 hg -R g up 0
135 echo b > g/b
136 hg -R g ci -Am b
128 hg init h
129 echo init > h/init
130 hg -R h ci -Am init
131 echo a > h/a
132 hg -R h ci -Am a
133 hg clone h i
137 134 hg -R h up 0
138 echo c > h/c
139 hg -R h ci -Am c
140 hg -R h push g
135 echo b > h/b
136 hg -R h ci -Am b
137 hg -R i up 0
138 echo c > i/c
139 hg -R i ci -Am c
140 hg -R i push h
141 141 echo
142 142
143 143 exit 0
@@ -1,143 +1,142
1 1 updating working directory
2 2 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
3 3 pushing to ../a
4 4 searching for changes
5 5 abort: push creates new remote heads!
6 6 (did you forget to merge? use push -f to force)
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 (+1 heads)
13 13 (run 'hg heads' to see heads, 'hg merge' to merge)
14 14 pushing to ../a
15 15 searching for changes
16 16 abort: push creates new remote heads!
17 17 (did you forget to merge? use push -f to force)
18 18 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
19 19 (branch merge, don't forget to commit)
20 20 pushing to ../a
21 21 searching for changes
22 22 adding changesets
23 23 adding manifests
24 24 adding file changes
25 25 added 2 changesets with 1 changes to 1 files
26 26 adding foo
27 27 updating working directory
28 28 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
29 29 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
30 30 created new head
31 31 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
32 32 created new head
33 33 merging foo
34 34 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
35 35 (branch merge, don't forget to commit)
36 36 pushing to ../c
37 37 searching for changes
38 38 abort: push creates new remote heads!
39 39 (did you forget to merge? use push -f to force)
40 40 1
41 41 pushing to ../c
42 42 searching for changes
43 43 no changes found
44 44 0
45 45 pushing to ../c
46 46 searching for changes
47 47 abort: push creates new remote heads!
48 48 (did you forget to merge? use push -f to force)
49 49 1
50 50 pushing to ../c
51 51 searching for changes
52 52 abort: push creates new remote heads!
53 53 (did you forget to merge? use push -f to force)
54 54 1
55 55 pushing to ../c
56 56 searching for changes
57 57 adding changesets
58 58 adding manifests
59 59 adding file changes
60 60 added 2 changesets with 2 changes to 1 files (+2 heads)
61 61 0
62 62 pushing to ../c
63 63 searching for changes
64 64 adding changesets
65 65 adding manifests
66 66 adding file changes
67 67 added 1 changesets with 1 changes to 1 files (-1 heads)
68 68 0
69 69 pushing to ../e
70 70 searching for changes
71 71 adding changesets
72 72 adding manifests
73 73 adding file changes
74 74 added 1 changesets with 1 changes to 1 files
75 75 0
76 76 pushing to ../e
77 77 searching for changes
78 78 adding changesets
79 79 adding manifests
80 80 adding file changes
81 81 added 1 changesets with 1 changes to 1 files
82 82 0
83 83 % issue 736
84 84 % push on existing branch and new branch
85 85 pushing to ../f
86 86 searching for changes
87 87 abort: push creates new remote branch 'c'!
88 88 (did you forget to merge? use push -f to force)
89 89 1
90 90 % fail on multiple head push
91 91 pushing to ../f
92 92 searching for changes
93 93 abort: push creates new remote heads!
94 94 (did you forget to merge? use push -f to force)
95 95 1
96 96 % push replacement head on existing branches
97 97 pushing to ../f
98 98 searching for changes
99 99 adding changesets
100 100 adding manifests
101 101 adding file changes
102 102 added 2 changesets with 2 changes to 1 files
103 103 0
104 104 % merge of branch a to other branch b followed by unrelated push on branch a
105 105 pushing to ../f
106 106 searching for changes
107 107 adding changesets
108 108 adding manifests
109 109 adding file changes
110 110 added 1 changesets with 1 changes to 1 files (-1 heads)
111 111 0
112 112 pushing to ../f
113 113 searching for changes
114 114 adding changesets
115 115 adding manifests
116 116 adding file changes
117 117 added 1 changesets with 1 changes to 1 files (+1 heads)
118 118 0
119 119 % cheating the counting algorithm
120 120 pushing to ../f
121 121 searching for changes
122 122 adding changesets
123 123 adding manifests
124 124 adding file changes
125 125 added 2 changesets with 2 changes to 1 files
126 126 0
127 127 % checking prepush logic does not allow silently pushing multiple new heads
128 abort: repository g already exists!
129 128 adding init
130 129 adding a
131 130 updating working directory
132 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
133 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
131 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
132 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
134 133 adding b
135 134 created new head
136 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
135 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
137 136 adding c
138 137 created new head
139 pushing to g
138 pushing to h
140 139 searching for changes
141 140 abort: push creates new remote heads!
142 141 (did you forget to merge? use push -f to force)
143 142
General Comments 0
You need to be logged in to leave comments. Login now