##// END OF EJS Templates
changegroupsubset: simplify prune...
Matt Mackall -
r13708:ce9b3043 default
parent child Browse files
Show More
@@ -1508,18 +1508,13 b' class localrepository(repo.repository):'
1508 # also assume the recipient will have all the parents. This function
1508 # also assume the recipient will have all the parents. This function
1509 # prunes them from the set of missing nodes.
1509 # prunes them from the set of missing nodes.
1510 def prune(revlog, missingnodes):
1510 def prune(revlog, missingnodes):
1511 hasset = set()
1511 # drop any nodes that claim to be part of a cset in commonrevs
1512 # If a 'missing' filenode thinks it belongs to a changenode we
1512 drop = set()
1513 # assume the recipient must have, then the recipient must have
1514 # that filenode.
1515 for n in missingnodes:
1513 for n in missingnodes:
1516 clrev = revlog.linkrev(revlog.rev(n))
1514 if revlog.linkrev(revlog.rev(n)) in commonrevs:
1517 if clrev in commonrevs:
1515 drop.add(n)
1518 hasset.add(n)
1516 for n in drop:
1519 for n in hasset:
1520 missingnodes.pop(n, None)
1517 missingnodes.pop(n, None)
1521 for r in revlog.ancestors(*[revlog.rev(n) for n in hasset]):
1522 missingnodes.pop(revlog.node(r), None)
1523
1518
1524 # Now that we have all theses utility functions to help out and
1519 # Now that we have all theses utility functions to help out and
1525 # logically divide up the task, generate the group.
1520 # logically divide up the task, generate the group.
General Comments 0
You need to be logged in to leave comments. Login now