Show More
@@ -1707,24 +1707,13 b' class localrepository(repo.repository):' | |||||
1707 | def identity(x): |
|
1707 | def identity(x): | |
1708 | return x |
|
1708 | return x | |
1709 |
|
1709 | |||
1710 | # A function generating function. Sets up an environment for the |
|
|||
1711 | # inner function. |
|
|||
1712 | def revkey(revlog): |
|
|||
1713 | # Key to sort a node by it's revision number in the environment's |
|
|||
1714 | # revision history. Since the revision number both represents the |
|
|||
1715 | # most efficient order to read the nodes in, and represents a |
|
|||
1716 | # topological sorting of the nodes, this function is often useful. |
|
|||
1717 | def revlog_sort_key(x): |
|
|||
1718 | return revlog.rev(x) |
|
|||
1719 | return revlog_sort_key |
|
|||
1720 |
|
||||
1721 | # If we determine that a particular file or manifest node must be a |
|
1710 | # If we determine that a particular file or manifest node must be a | |
1722 | # node that the recipient of the changegroup will already have, we can |
|
1711 | # node that the recipient of the changegroup will already have, we can | |
1723 | # also assume the recipient will have all the parents. This function |
|
1712 | # also assume the recipient will have all the parents. This function | |
1724 | # prunes them from the set of missing nodes. |
|
1713 | # prunes them from the set of missing nodes. | |
1725 | def prune_parents(revlog, hasset, msngset): |
|
1714 | def prune_parents(revlog, hasset, msngset): | |
1726 | haslst = list(hasset) |
|
1715 | haslst = list(hasset) | |
1727 |
haslst.sort(key= |
|
1716 | haslst.sort(key=revlog.rev) | |
1728 | for node in haslst: |
|
1717 | for node in haslst: | |
1729 | parentlst = [p for p in revlog.parents(node) if p != nullid] |
|
1718 | parentlst = [p for p in revlog.parents(node) if p != nullid] | |
1730 | while parentlst: |
|
1719 | while parentlst: | |
@@ -1874,7 +1863,7 b' class localrepository(repo.repository):' | |||||
1874 | add_extra_nodes(1, msng_mnfst_set) |
|
1863 | add_extra_nodes(1, msng_mnfst_set) | |
1875 | msng_mnfst_lst = msng_mnfst_set.keys() |
|
1864 | msng_mnfst_lst = msng_mnfst_set.keys() | |
1876 | # Sort the manifestnodes by revision number. |
|
1865 | # Sort the manifestnodes by revision number. | |
1877 |
msng_mnfst_lst.sort(key= |
|
1866 | msng_mnfst_lst.sort(key=mnfst.rev) | |
1878 | # Create a generator for the manifestnodes that calls our lookup |
|
1867 | # Create a generator for the manifestnodes that calls our lookup | |
1879 | # and data collection functions back. |
|
1868 | # and data collection functions back. | |
1880 | group = mnfst.group(msng_mnfst_lst, lookup_manifest_link, |
|
1869 | group = mnfst.group(msng_mnfst_lst, lookup_manifest_link, | |
@@ -1912,7 +1901,7 b' class localrepository(repo.repository):' | |||||
1912 | yield changegroup.chunkheader(len(fname)) |
|
1901 | yield changegroup.chunkheader(len(fname)) | |
1913 | yield fname |
|
1902 | yield fname | |
1914 | # Sort the filenodes by their revision # |
|
1903 | # Sort the filenodes by their revision # | |
1915 |
msng_filenode_lst.sort(key= |
|
1904 | msng_filenode_lst.sort(key=filerevlog.rev) | |
1916 | # Create a group generator and only pass in a changenode |
|
1905 | # Create a group generator and only pass in a changenode | |
1917 | # lookup function as we need to collect no information |
|
1906 | # lookup function as we need to collect no information | |
1918 | # from filenodes. |
|
1907 | # from filenodes. |
General Comments 0
You need to be logged in to leave comments.
Login now