mercurial/repair.py
changeset 16867 1093ad1e8903
parent 16745 27b2e1823e83
child 17013 c8eda7bbdcab
equal deleted inserted replaced
16866:91f3ac205816 16867:1093ad1e8903
    72     # the list of heads and bases of the set of interesting revisions.
    72     # the list of heads and bases of the set of interesting revisions.
    73     # (head = revision in the set that has no descendant in the set;
    73     # (head = revision in the set that has no descendant in the set;
    74     #  base = revision in the set that has no ancestor in the set)
    74     #  base = revision in the set that has no ancestor in the set)
    75     tostrip = set(striplist)
    75     tostrip = set(striplist)
    76     for rev in striplist:
    76     for rev in striplist:
    77         for desc in cl.descendants(rev):
    77         for desc in cl.descendants([rev]):
    78             tostrip.add(desc)
    78             tostrip.add(desc)
    79 
    79 
    80     files = _collectfiles(repo, striprev)
    80     files = _collectfiles(repo, striprev)
    81     saverevs = _collectbrokencsets(repo, files, striprev)
    81     saverevs = _collectbrokencsets(repo, files, striprev)
    82 
    82 
    89             saveheads.add(r)
    89             saveheads.add(r)
    90     saveheads = [cl.node(r) for r in saveheads]
    90     saveheads = [cl.node(r) for r in saveheads]
    91 
    91 
    92     # compute base nodes
    92     # compute base nodes
    93     if saverevs:
    93     if saverevs:
    94         descendants = set(cl.descendants(*saverevs))
    94         descendants = set(cl.descendants(saverevs))
    95         saverevs.difference_update(descendants)
    95         saverevs.difference_update(descendants)
    96     savebases = [cl.node(r) for r in saverevs]
    96     savebases = [cl.node(r) for r in saverevs]
    97     stripbases = [cl.node(r) for r in tostrip]
    97     stripbases = [cl.node(r) for r in tostrip]
    98 
    98 
    99     bm = repo._bookmarks
    99     bm = repo._bookmarks