101 bases = " ".join(map(hex, bases)) |
101 bases = " ".join(map(hex, bases)) |
102 heads = " ".join(map(hex, heads)) |
102 heads = " ".join(map(hex, heads)) |
103 return self._decompress(self._callstream("changegroupsubset", |
103 return self._decompress(self._callstream("changegroupsubset", |
104 bases=bases, heads=heads)) |
104 bases=bases, heads=heads)) |
105 |
105 |
|
106 def unbundle(self, cg, heads, source): |
|
107 '''Send cg (a readable file-like object representing the |
|
108 changegroup to push, typically a chunkbuffer object) to the |
|
109 remote server as a bundle. Return an integer indicating the |
|
110 result of the push (see localrepository.addchangegroup()).''' |
|
111 |
|
112 ret, output = self._callpush("unbundle", cg, heads=' '.join(map(hex, heads))) |
|
113 if ret == "": |
|
114 raise error.ResponseError( |
|
115 _('push failed:'), output) |
|
116 try: |
|
117 ret = int(ret) |
|
118 except ValueError, err: |
|
119 raise error.ResponseError( |
|
120 _('push failed (unexpected response):'), ret) |
|
121 |
|
122 for l in output.splitlines(True): |
|
123 self.ui.status(_('remote: '), l) |
|
124 return ret |
|
125 |
106 # server side |
126 # server side |
107 |
127 |
108 def dispatch(repo, proto, command): |
128 def dispatch(repo, proto, command): |
109 if command not in commands: |
129 if command not in commands: |
110 return False |
130 return False |