Show More
@@ -1575,9 +1575,8 b' class localrepository(repo.repository):' | |||
|
1575 | 1575 | localbrheads = self.branchmap() |
|
1576 | 1576 | else: |
|
1577 | 1577 | localbrheads = {} |
|
1578 |
for n in |
|
|
1579 |
|
|
|
1580 | localbrheads.setdefault(branch, []).append(n) | |
|
1578 | ctxgen = (self[n] for n in msng_cl) | |
|
1579 | self._updatebranchcache(localbrheads, ctxgen) | |
|
1581 | 1580 | |
|
1582 | 1581 | newbranches = list(set(localbrheads) - set(remotebrheads)) |
|
1583 | 1582 | if newbranches: # new branch requires --force |
@@ -166,4 +166,32 b' hg -R k ci -m merge' | |||
|
166 | 166 | hg -R k push -r a j |
|
167 | 167 | echo |
|
168 | 168 | |
|
169 | echo % prepush -r should not allow you to sneak in new heads | |
|
170 | hg init l | |
|
171 | cd l | |
|
172 | echo a >> foo | |
|
173 | hg -q add foo | |
|
174 | hg -q branch a | |
|
175 | hg -q ci -d '0 0' -ma | |
|
176 | hg -q up null | |
|
177 | echo a >> foo | |
|
178 | hg -q add foo | |
|
179 | hg -q branch b | |
|
180 | hg -q ci -d '0 0' -mb | |
|
181 | cd .. | |
|
182 | hg -q clone l m -u a | |
|
183 | cd m | |
|
184 | hg -q merge b | |
|
185 | hg -q ci -d '0 0' -mmb | |
|
186 | hg -q up 0 | |
|
187 | echo a >> foo | |
|
188 | hg -q ci -ma2 | |
|
189 | hg -q up 2 | |
|
190 | echo a >> foo | |
|
191 | hg -q branch -f b | |
|
192 | hg -q ci -d '0 0' -mb2 | |
|
193 | hg -q merge 3 | |
|
194 | hg -q ci -d '0 0' -mma | |
|
195 | hg push ../l -b b | |
|
196 | ||
|
169 | 197 | exit 0 |
@@ -100,7 +100,7 b' abort: push creates new remote branches:' | |||
|
100 | 100 | 1 |
|
101 | 101 | pushing to ../f |
|
102 | 102 | searching for changes |
|
103 | abort: push creates new remote branches: d! | |
|
103 | abort: push creates new remote branches: c, d! | |
|
104 | 104 | (use 'hg push -f' to force) |
|
105 | 105 | 1 |
|
106 | 106 | % fail on multiple head push |
@@ -167,6 +167,11 b' 1 files updated, 0 files merged, 0 files' | |||
|
167 | 167 | (branch merge, don't forget to commit) |
|
168 | 168 | pushing to j |
|
169 | 169 | searching for changes |
|
170 | abort: push creates new remote branches: b! | |
|
171 | (use 'hg push -f' to force) | |
|
172 | ||
|
173 | % prepush -r should not allow you to sneak in new heads | |
|
174 | pushing to ../l | |
|
175 | searching for changes | |
|
170 | 176 | abort: push creates new remote heads on branch 'a'! |
|
171 |
( |
|
|
172 | ||
|
177 | (did you forget to merge? use push -f to force) |
General Comments 0
You need to be logged in to leave comments.
Login now