equal
deleted
inserted
replaced
151 |
151 |
152 # 1. Create set of branches involved in the push. |
152 # 1. Create set of branches involved in the push. |
153 branches = set(repo[n].branch() for n in outgoing.missing) |
153 branches = set(repo[n].branch() for n in outgoing.missing) |
154 |
154 |
155 # 2. Check for new branches on the remote. |
155 # 2. Check for new branches on the remote. |
156 remotemap = remote.branchmap() |
156 if remote.local(): |
|
157 remotemap = phases.visiblebranchmap(remote) |
|
158 else: |
|
159 remotemap = remote.branchmap() |
157 newbranches = branches - set(remotemap) |
160 newbranches = branches - set(remotemap) |
158 if newbranches and not newbranch: # new branch requires --new-branch |
161 if newbranches and not newbranch: # new branch requires --new-branch |
159 branchnames = ', '.join(sorted(newbranches)) |
162 branchnames = ', '.join(sorted(newbranches)) |
160 raise util.Abort(_("push creates new remote branches: %s!") |
163 raise util.Abort(_("push creates new remote branches: %s!") |
161 % branchnames, |
164 % branchnames, |