Show More
@@ -1478,6 +1478,7 b' class localrepository(repo.repository):' | |||||
1478 | mf = self.manifest |
|
1478 | mf = self.manifest | |
1479 | mfs = {} # needed manifests |
|
1479 | mfs = {} # needed manifests | |
1480 | fnodes = {} # needed file nodes |
|
1480 | fnodes = {} # needed file nodes | |
|
1481 | changedfiles = set() | |||
1481 |
|
1482 | |||
1482 | # can we go through the fast path ? |
|
1483 | # can we go through the fast path ? | |
1483 | heads.sort() |
|
1484 | heads.sort() | |
@@ -1498,7 +1499,6 b' class localrepository(repo.repository):' | |||||
1498 | # logically divide up the task, generate the group. |
|
1499 | # logically divide up the task, generate the group. | |
1499 | def gengroup(): |
|
1500 | def gengroup(): | |
1500 | # The set of changed files starts empty. |
|
1501 | # The set of changed files starts empty. | |
1501 | changedfiles = set() |
|
|||
1502 |
|
1502 | |||
1503 | count = [0] |
|
1503 | count = [0] | |
1504 | def clookup(revlog, x): |
|
1504 | def clookup(revlog, x): | |
@@ -1588,11 +1588,15 b' class localrepository(repo.repository):' | |||||
1588 |
|
1588 | |||
1589 | nodes is the set of nodes to send""" |
|
1589 | nodes is the set of nodes to send""" | |
1590 |
|
1590 | |||
1591 | self.hook('preoutgoing', throw=True, source=source) |
|
1591 | cl = self.changelog | |
|
1592 | mf = self.manifest | |||
|
1593 | mfs = {} | |||
|
1594 | changedfiles = set() | |||
1592 |
|
1595 | |||
1593 | cl = self.changelog |
|
1596 | self.hook('preoutgoing', throw=True, source=source) | |
|
1597 | self.changegroupinfo(nodes, source) | |||
|
1598 | ||||
1594 | revset = set([cl.rev(n) for n in nodes]) |
|
1599 | revset = set([cl.rev(n) for n in nodes]) | |
1595 | self.changegroupinfo(nodes, source) |
|
|||
1596 |
|
1600 | |||
1597 | def gennodelst(log): |
|
1601 | def gennodelst(log): | |
1598 | for r in log: |
|
1602 | for r in log: | |
@@ -1602,14 +1606,12 b' class localrepository(repo.repository):' | |||||
1602 | def gengroup(): |
|
1606 | def gengroup(): | |
1603 | '''yield a sequence of changegroup chunks (strings)''' |
|
1607 | '''yield a sequence of changegroup chunks (strings)''' | |
1604 | # construct a list of all changed files |
|
1608 | # construct a list of all changed files | |
1605 | changedfiles = set() |
|
|||
1606 | mmfs = {} |
|
|||
1607 |
|
1609 | |||
1608 | count = [0] |
|
1610 | count = [0] | |
1609 | def clookup(revlog, x): |
|
1611 | def clookup(revlog, x): | |
1610 | c = cl.read(x) |
|
1612 | c = cl.read(x) | |
1611 | changedfiles.update(c[3]) |
|
1613 | changedfiles.update(c[3]) | |
1612 |
|
|
1614 | mfs.setdefault(c[0], x) | |
1613 | count[0] += 1 |
|
1615 | count[0] += 1 | |
1614 | self.ui.progress(_('bundling'), count[0], unit=_('changesets')) |
|
1616 | self.ui.progress(_('bundling'), count[0], unit=_('changesets')) | |
1615 | return x |
|
1617 | return x | |
@@ -1620,7 +1622,6 b' class localrepository(repo.repository):' | |||||
1620 | changecount = count[0] |
|
1622 | changecount = count[0] | |
1621 | self.ui.progress(_('bundling'), None) |
|
1623 | self.ui.progress(_('bundling'), None) | |
1622 |
|
1624 | |||
1623 | mnfst = self.manifest |
|
|||
1624 | count = [0] |
|
1625 | count = [0] | |
1625 | def mlookup(revlog, x): |
|
1626 | def mlookup(revlog, x): | |
1626 | count[0] += 1 |
|
1627 | count[0] += 1 | |
@@ -1628,7 +1629,7 b' class localrepository(repo.repository):' | |||||
1628 | unit=_('manifests'), total=changecount) |
|
1629 | unit=_('manifests'), total=changecount) | |
1629 | return cl.node(revlog.linkrev(revlog.rev(x))) |
|
1630 | return cl.node(revlog.linkrev(revlog.rev(x))) | |
1630 |
|
1631 | |||
1631 |
for chunk in m |
|
1632 | for chunk in mf.group(gennodelst(mf), mlookup): | |
1632 | yield chunk |
|
1633 | yield chunk | |
1633 | self.ui.progress(_('bundling'), None) |
|
1634 | self.ui.progress(_('bundling'), None) | |
1634 |
|
1635 | |||
@@ -1651,10 +1652,9 b' class localrepository(repo.repository):' | |||||
1651 | yield fname |
|
1652 | yield fname | |
1652 | first = False |
|
1653 | first = False | |
1653 | yield chunk |
|
1654 | yield chunk | |
|
1655 | yield changegroup.closechunk() | |||
1654 | self.ui.progress(_('bundling'), None) |
|
1656 | self.ui.progress(_('bundling'), None) | |
1655 |
|
1657 | |||
1656 | yield changegroup.closechunk() |
|
|||
1657 |
|
||||
1658 | if nodes: |
|
1658 | if nodes: | |
1659 | self.hook('outgoing', node=hex(nodes[0]), source=source) |
|
1659 | self.hook('outgoing', node=hex(nodes[0]), source=source) | |
1660 |
|
1660 |
General Comments 0
You need to be logged in to leave comments.
Login now