Show More
@@ -1543,7 +1543,7 b' class localrepository(repo.repository):' | |||
|
1543 | 1543 | if msng_cl_lst: |
|
1544 | 1544 | self.hook('outgoing', node=hex(msng_cl_lst[0]), source=source) |
|
1545 | 1545 | |
|
1546 | return util.chunkbuffer(gengroup()) | |
|
1546 | return changegroup.unbundle10(util.chunkbuffer(gengroup()), 'UN') | |
|
1547 | 1547 | |
|
1548 | 1548 | def changegroup(self, basenodes, source): |
|
1549 | 1549 | # to avoid a race we use changegroupsubset() (issue1320) |
@@ -1621,7 +1621,7 b' class localrepository(repo.repository):' | |||
|
1621 | 1621 | if nodes: |
|
1622 | 1622 | self.hook('outgoing', node=hex(nodes[0]), source=source) |
|
1623 | 1623 | |
|
1624 | return util.chunkbuffer(gengroup()) | |
|
1624 | return changegroup.unbundle10(util.chunkbuffer(gengroup()), 'UN') | |
|
1625 | 1625 | |
|
1626 | 1626 | def addchangegroup(self, source, srctype, url, emptyok=False, lock=None): |
|
1627 | 1627 | """Add the changegroup returned by source.read() to this repo. |
@@ -1644,9 +1644,6 b' class localrepository(repo.repository):' | |||
|
1644 | 1644 | if not source: |
|
1645 | 1645 | return 0 |
|
1646 | 1646 | |
|
1647 | if not hasattr(source, 'chunk'): | |
|
1648 | source = changegroup.unbundle10(source, 'UN') | |
|
1649 | ||
|
1650 | 1647 | self.hook('prechangegroup', throw=True, source=srctype, url=url) |
|
1651 | 1648 | |
|
1652 | 1649 | changesets = files = revisions = 0 |
@@ -6,7 +6,7 b'' | |||
|
6 | 6 | # This software may be used and distributed according to the terms of the |
|
7 | 7 | # GNU General Public License version 2 or any later version. |
|
8 | 8 | |
|
9 | import util, hook, wireproto | |
|
9 | import util, hook, wireproto, changegroup | |
|
10 | 10 | import os, sys |
|
11 | 11 | |
|
12 | 12 | class sshserver(object): |
@@ -130,7 +130,8 b' class sshserver(object):' | |||
|
130 | 130 | return |
|
131 | 131 | |
|
132 | 132 | self.sendresponse("") |
|
133 | r = self.repo.addchangegroup(self.fin, 'serve', self._client(), | |
|
133 | cg = changegroup.unbundle10(self.fin, "UN") | |
|
134 | r = self.repo.addchangegroup(cg, 'serve', self._client(), | |
|
134 | 135 | lock=self.lock) |
|
135 | 136 | return str(r) |
|
136 | 137 |
@@ -102,14 +102,15 b' class wirerepository(repo.repository):' | |||
|
102 | 102 | def changegroup(self, nodes, kind): |
|
103 | 103 | n = encodelist(nodes) |
|
104 | 104 | f = self._callstream("changegroup", roots=n) |
|
105 | return self._decompress(f) | |
|
105 | return changegroupmod.unbundle10(self._decompress(f), 'UN') | |
|
106 | 106 | |
|
107 | 107 | def changegroupsubset(self, bases, heads, kind): |
|
108 | 108 | self.requirecap('changegroupsubset', _('look up remote changes')) |
|
109 | 109 | bases = encodelist(bases) |
|
110 | 110 | heads = encodelist(heads) |
|
111 |
|
|
|
112 |
|
|
|
111 | f = self._callstream("changegroupsubset", | |
|
112 | bases=bases, heads=heads) | |
|
113 | return changegroupmod.unbundle10(self._decompress(f), 'UN') | |
|
113 | 114 | |
|
114 | 115 | def unbundle(self, cg, heads, source): |
|
115 | 116 | '''Send cg (a readable file-like object representing the |
General Comments 0
You need to be logged in to leave comments.
Login now