mercurial/discovery.py
changeset 15713 cff25e4b37d2
parent 15513 646759147717
child 15837 cd956049fc14
equal deleted inserted replaced
15712:06b8b74720d6 15713:cff25e4b37d2
    83     common, revs = findcommonoutgoing(repo, remote, onlyheads=revs,
    83     common, revs = findcommonoutgoing(repo, remote, onlyheads=revs,
    84                                       commoninc=commoninc, force=force)
    84                                       commoninc=commoninc, force=force)
    85     _common, inc, remoteheads = commoninc
    85     _common, inc, remoteheads = commoninc
    86 
    86 
    87     cl = repo.changelog
    87     cl = repo.changelog
    88     outg = cl.findmissing(common, revs)
    88     alloutg = cl.findmissing(common, revs)
       
    89     outg = []
       
    90     secret = []
       
    91     for o in alloutg:
       
    92         if repo[o].phase() >= 2:
       
    93             secret.append(o)
       
    94         else:
       
    95             outg.append(o)
    89 
    96 
    90     if not outg:
    97     if not outg:
    91         repo.ui.status(_("no changes found\n"))
    98         if secret:
       
    99             repo.ui.status(_("no changes to push but %i secret changesets\n")
       
   100                            % len(secret))
       
   101         else:
       
   102             repo.ui.status(_("no changes found\n"))
    92         return None, 1, common
   103         return None, 1, common
       
   104 
       
   105     if secret:
       
   106         # recompute target revs
       
   107         revs = [ctx.node() for ctx in repo.set('heads(::(%ld))',
       
   108                                                map(repo.changelog.rev, outg))]
    93 
   109 
    94     if not force and remoteheads != [nullid]:
   110     if not force and remoteheads != [nullid]:
    95         if remote.capable('branchmap'):
   111         if remote.capable('branchmap'):
    96             # Check for each named branch if we're creating new remote heads.
   112             # Check for each named branch if we're creating new remote heads.
    97             # To be a remote head after push, node must be either:
   113             # To be a remote head after push, node must be either: