hgext/rebase.py
changeset 38672 0f8599afb92f
parent 38671 99ed6e2f6606
child 38673 20a30bb8f276
equal deleted inserted replaced
38671:99ed6e2f6606 38672:0f8599afb92f
  1867             obsoleteextinctsuccessors.add(srcrev)
  1867             obsoleteextinctsuccessors.add(srcrev)
  1868         if not successors:
  1868         if not successors:
  1869             # no successor
  1869             # no successor
  1870             obsoletenotrebased[srcrev] = None
  1870             obsoletenotrebased[srcrev] = None
  1871         else:
  1871         else:
  1872             destnode = cl.node(destmap[srcrev])
  1872             dstrev = destmap[srcrev]
  1873             for succnode in successors:
  1873             succrevs = [nodemap[s] for s in successors if s in nodemap]
  1874                 if succnode not in nodemap:
  1874             for succrev in succrevs:
  1875                     continue
  1875                 if cl.isancestorrev(succrev, dstrev):
  1876                 if cl.isancestor(succnode, destnode):
  1876                     obsoletenotrebased[srcrev] = succrev
  1877                     obsoletenotrebased[srcrev] = nodemap[succnode]
       
  1878                     break
  1877                     break
  1879             else:
  1878             else:
  1880                 # If 'srcrev' has a successor in rebase set but none in
  1879                 # If 'srcrev' has a successor in rebase set but none in
  1881                 # destination (which would be catched above), we shall skip it
  1880                 # destination (which would be catched above), we shall skip it
  1882                 # and its descendants to avoid divergence.
  1881                 # and its descendants to avoid divergence.
  1883                 if any(nodemap[s] in destmap for s in successors
  1882                 if any(s in destmap for s in succrevs):
  1884                        if s in nodemap):
       
  1885                     obsoletewithoutsuccessorindestination.add(srcrev)
  1883                     obsoletewithoutsuccessorindestination.add(srcrev)
  1886 
  1884 
  1887     return (
  1885     return (
  1888         obsoletenotrebased,
  1886         obsoletenotrebased,
  1889         obsoletewithoutsuccessorindestination,
  1887         obsoletewithoutsuccessorindestination,