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