mercurial/discovery.py
branchstable
changeset 16535 39d1f83eb05d
parent 15986 ba959f6e10f8
child 16657 b6081c2c4647
child 16736 025b3b763ba9
equal deleted inserted replaced
16534:11212babc690 16535:39d1f83eb05d
   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,