Show More
@@ -340,15 +340,15 b' def checkheads(pushop):' | |||||
340 | pushop.pushbranchmap = headssum |
|
340 | pushop.pushbranchmap = headssum | |
341 | newbranches = [branch for branch, heads in headssum.iteritems() |
|
341 | newbranches = [branch for branch, heads in headssum.iteritems() | |
342 | if heads[0] is None] |
|
342 | if heads[0] is None] | |
343 | # Makes a set of closed branches |
|
|||
344 | closedbranches = set() |
|
|||
345 | for tag, heads, tip, isclosed in repo.branchmap().iterbranches(): |
|
|||
346 | if isclosed: |
|
|||
347 | closedbranches.add(tag) |
|
|||
348 | closedbranches = (closedbranches & set(newbranches)) |
|
|||
349 | # 1. Check for new branches on the remote. |
|
343 | # 1. Check for new branches on the remote. | |
350 | if newbranches and not newbranch: # new branch requires --new-branch |
|
344 | if newbranches and not newbranch: # new branch requires --new-branch | |
351 | branchnames = ', '.join(sorted(newbranches)) |
|
345 | branchnames = ', '.join(sorted(newbranches)) | |
|
346 | # Calculate how many of the new branches are closed branches | |||
|
347 | closedbranches = set() | |||
|
348 | for tag, heads, tip, isclosed in repo.branchmap().iterbranches(): | |||
|
349 | if isclosed: | |||
|
350 | closedbranches.add(tag) | |||
|
351 | closedbranches = (closedbranches & set(newbranches)) | |||
352 | if closedbranches: |
|
352 | if closedbranches: | |
353 | errmsg = (_("push creates new remote branches: %s (%d closed)!") |
|
353 | errmsg = (_("push creates new remote branches: %s (%d closed)!") | |
354 | % (branchnames, len(closedbranches))) |
|
354 | % (branchnames, len(closedbranches))) |
General Comments 0
You need to be logged in to leave comments.
Login now