Show More
@@ -225,7 +225,6 b' def checkheads(repo, remote, outgoing, r' | |||
|
225 | 225 | # If there are more heads after the push than before, a suitable |
|
226 | 226 | # error message, depending on unsynced status, is displayed. |
|
227 | 227 | error = None |
|
228 | remotebookmarks = remote.listkeys('bookmarks') | |
|
229 | 228 | localbookmarks = repo._bookmarks |
|
230 | 229 | |
|
231 | 230 | for branch in branches: |
@@ -234,9 +233,14 b' def checkheads(repo, remote, outgoing, r' | |||
|
234 | 233 | dhs = None |
|
235 | 234 | if len(newhs) > len(oldhs): |
|
236 | 235 | # strip updates to existing remote heads from the new heads list |
|
237 | bookmarkedheads = set([repo[bm].node() for bm in localbookmarks | |
|
238 | if bm in remotebookmarks and | |
|
239 | remote[bm] == repo[bm].ancestor(remote[bm])]) | |
|
236 | remotebookmarks = remote.listkeys('bookmarks') | |
|
237 | bookmarkedheads = set() | |
|
238 | for bm in localbookmarks: | |
|
239 | rnode = remotebookmarks.get(bm) | |
|
240 | if rnode and rnode in repo: | |
|
241 | lctx, rctx = repo[bm], repo[rnode] | |
|
242 | if rctx == lctx.ancestor(rctx): | |
|
243 | bookmarkedheads.add(lctx.node()) | |
|
240 | 244 | dhs = list(newhs - bookmarkedheads - oldhs) |
|
241 | 245 | if dhs: |
|
242 | 246 | if error is None: |
@@ -177,8 +177,18 b' diverging a remote bookmark fails' | |||
|
177 | 177 | adding f2 |
|
178 | 178 | created new head |
|
179 | 179 | $ hg book -f Y |
|
180 | $ hg push ../a | |
|
181 | pushing to ../a | |
|
180 | ||
|
181 | $ cat <<EOF > ../a/.hg/hgrc | |
|
182 | > [web] | |
|
183 | > push_ssl = false | |
|
184 | > allow_push = * | |
|
185 | > EOF | |
|
186 | ||
|
187 | $ hg -R ../a serve -p $HGPORT2 -d --pid-file=../hg2.pid | |
|
188 | $ cat ../hg2.pid >> $DAEMON_PIDS | |
|
189 | ||
|
190 | $ hg push http://localhost:$HGPORT2/ | |
|
191 | pushing to http://localhost:$HGPORT2/ | |
|
182 | 192 | searching for changes |
|
183 | 193 | abort: push creates new remote head 4efff6d98829! |
|
184 | 194 | (did you forget to merge? use push -f to force) |
General Comments 0
You need to be logged in to leave comments.
Login now