Mercurial > hg
comparison tests/test-push-warn @ 10354:844d83da2da9
prepush: warn about every new outgoing named branch, not just the first
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Sun, 07 Feb 2010 00:43:24 +0100 |
parents | d6a307719ccb |
children | 01f097c4ae66 |
comparison
equal
deleted
inserted
replaced
10353:36b6b5ef7820 | 10354:844d83da2da9 |
---|---|
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 ../f; echo $? | |
93 hg push -r 4 -r 5 ../f; echo $? | 94 hg push -r 4 -r 5 ../f; echo $? |
95 | |
96 echo % multiple new branches | |
97 hg -q branch d | |
98 echo 6 > foo | |
99 hg -q ci -d "1000000 0" -m 6 | |
100 hg push ../f; echo $? | |
101 hg push -r 4 -r 6 ../f; echo $? | |
102 cd ../g | |
94 | 103 |
95 echo % fail on multiple head push | 104 echo % fail on multiple head push |
96 hg -q up 1 | 105 hg -q up 1 |
97 echo 6 > foo | 106 echo 7 > foo |
98 hg -q ci -d "1000000 0" -m 6 | 107 hg -q ci -d "1000000 0" -m 7 |
99 hg push -r 4 -r 6 ../f; echo $? | 108 hg push -r 4 -r 7 ../f; echo $? |
100 | 109 |
101 echo % push replacement head on existing branches | 110 echo % push replacement head on existing branches |
102 hg -q up 3 | 111 hg -q up 3 |
103 echo 7 > foo | 112 echo 8 > foo |
104 hg -q ci -d "1000000 0" -m 7 | 113 hg -q ci -d "1000000 0" -m 8 |
105 hg push -r 6 -r 7 ../f; echo $? | 114 hg push -r 7 -r 8 ../f; echo $? |
106 | 115 |
107 echo % merge of branch a to other branch b followed by unrelated push on branch a | 116 echo % merge of branch a to other branch b followed by unrelated push on branch a |
108 hg -q up 6 | |
109 HGMERGE=true hg -q merge 7 | |
110 hg -q ci -d "1000000 0" -m 8 | |
111 hg -q up 7 | 117 hg -q up 7 |
112 echo 9 > foo | 118 HGMERGE=true hg -q merge 8 |
113 hg -q ci -d "1000000 0" -m 9 | 119 hg -q ci -d "1000000 0" -m 9 |
114 hg push -r 8 ../f; echo $? | 120 hg -q up 8 |
121 echo 10 > foo | |
122 hg -q ci -d "1000000 0" -m 10 | |
115 hg push -r 9 ../f; echo $? | 123 hg push -r 9 ../f; echo $? |
124 hg push -r 10 ../f; echo $? | |
116 | 125 |
117 echo % cheating the counting algorithm | 126 echo % cheating the counting algorithm |
118 hg -q up 8 | 127 hg -q up 9 |
119 HGMERGE=true hg -q merge 2 | 128 HGMERGE=true hg -q merge 2 |
120 hg -q ci -d "1000000 0" -m 10 | 129 hg -q ci -d "1000000 0" -m 11 |
121 hg -q up 1 | 130 hg -q up 1 |
122 echo 11 > foo | 131 echo 12 > foo |
123 hg -q ci -d "1000000 0" -m 11 | 132 hg -q ci -d "1000000 0" -m 12 |
124 hg push -r 10 -r 11 ../f; echo $? | 133 hg push -r 11 -r 12 ../f; echo $? |
125 | 134 |
126 echo % checking prepush logic does not allow silently pushing multiple new heads | 135 echo % checking prepush logic does not allow silently pushing multiple new heads |
127 cd .. | 136 cd .. |
128 hg init h | 137 hg init h |
129 echo init > h/init | 138 echo init > h/init |