mercurial/repair.py
branchstable
changeset 17410 7c865f30e2b8
parent 17264 ec7b9bec19c9
child 17796 1b51638bf44a
equal deleted inserted replaced
17409:1fc45b9a1300 17410:7c865f30e2b8
   109     if saverevs:
   109     if saverevs:
   110         descendants = set(cl.descendants(saverevs))
   110         descendants = set(cl.descendants(saverevs))
   111         saverevs.difference_update(descendants)
   111         saverevs.difference_update(descendants)
   112     savebases = [cl.node(r) for r in saverevs]
   112     savebases = [cl.node(r) for r in saverevs]
   113     stripbases = [cl.node(r) for r in tostrip]
   113     stripbases = [cl.node(r) for r in tostrip]
   114     rset = ' or '.join([str(r) for r in tostrip])
   114     newbmtarget = repo.revs('sort(heads((::%ld) - (%ld)), -rev)',
   115     newbmtarget = repo.revs('sort(heads(ancestors(%r) - (%r)), -rev)',
   115                             tostrip, tostrip)
   116                             rset, rset)
       
   117     if newbmtarget:
   116     if newbmtarget:
   118         newbmtarget = newbmtarget[0]
   117         newbmtarget = newbmtarget[0]
   119     else:
   118     else:
   120         newbmtarget = '.'
   119         newbmtarget = '.'
   121 
   120