##// END OF EJS Templates
localrepo: inline single-use nested function
Dirkjan Ochtman -
r10357:0d64b30b default
parent child Browse files
Show More
@@ -1716,20 +1716,6 b' class localrepository(repo.repository):'
1716 for r in revlog.ancestors(*[revlog.rev(n) for n in hasset]):
1716 for r in revlog.ancestors(*[revlog.rev(n) for n in hasset]):
1717 msngset.pop(revlog.node(r), None)
1717 msngset.pop(revlog.node(r), None)
1718
1718
1719 # Figure out which manifest nodes (of the ones we think might be part
1720 # of the changegroup) the recipient must know about and remove them
1721 # from the changegroup.
1722 def prune_manifests():
1723 has_mnfst_set = set()
1724 for n in msng_mnfst_set:
1725 # If a 'missing' manifest thinks it belongs to a changenode
1726 # the recipient is assumed to have, obviously the recipient
1727 # must have that manifest.
1728 linknode = cl.node(mnfst.linkrev(mnfst.rev(n)))
1729 if linknode in has_cl_set:
1730 has_mnfst_set.add(n)
1731 prune_parents(mnfst, has_mnfst_set, msng_mnfst_set)
1732
1733 # Use the information collected in collect_manifests_and_files to say
1719 # Use the information collected in collect_manifests_and_files to say
1734 # which changenode any manifestnode belongs to.
1720 # which changenode any manifestnode belongs to.
1735 def lookup_manifest_link(mnfstnode):
1721 def lookup_manifest_link(mnfstnode):
@@ -1824,9 +1810,18 b' class localrepository(repo.repository):'
1824 for chnk in group:
1810 for chnk in group:
1825 yield chnk
1811 yield chnk
1826
1812
1827 # The list of manifests has been collected by the generator
1813 # Figure out which manifest nodes (of the ones we think might be
1828 # calling our functions back.
1814 # part of the changegroup) the recipient must know about and
1829 prune_manifests()
1815 # remove them from the changegroup.
1816 has_mnfst_set = set()
1817 for n in msng_mnfst_set:
1818 # If a 'missing' manifest thinks it belongs to a changenode
1819 # the recipient is assumed to have, obviously the recipient
1820 # must have that manifest.
1821 linknode = cl.node(mnfst.linkrev(mnfst.rev(n)))
1822 if linknode in has_cl_set:
1823 has_mnfst_set.add(n)
1824 prune_parents(mnfst, has_mnfst_set, msng_mnfst_set)
1830 add_extra_nodes(1, msng_mnfst_set)
1825 add_extra_nodes(1, msng_mnfst_set)
1831 msng_mnfst_lst = msng_mnfst_set.keys()
1826 msng_mnfst_lst = msng_mnfst_set.keys()
1832 # Sort the manifestnodes by revision number.
1827 # Sort the manifestnodes by revision number.
General Comments 0
You need to be logged in to leave comments. Login now