equal
deleted
inserted
replaced
6 # This software may be used and distributed according to the terms of the |
6 # This software may be used and distributed according to the terms of the |
7 # GNU General Public License version 2 or any later version. |
7 # GNU General Public License version 2 or any later version. |
8 |
8 |
9 from node import nullid |
9 from node import nullid |
10 from i18n import _ |
10 from i18n import _ |
11 import changegroup, statichttprepo, error, url, util, wireproto |
11 import changegroup, statichttprepo, error, httpconnection, url, util, wireproto |
12 import os, urllib, urllib2, zlib, httplib |
12 import os, urllib, urllib2, zlib, httplib |
13 import errno, socket |
13 import errno, socket |
14 |
14 |
15 def zgenerator(f): |
15 def zgenerator(f): |
16 zd = zlib.decompressobj() |
16 zd = zlib.decompressobj() |
178 if x in changegroup.bundletypes: |
178 if x in changegroup.bundletypes: |
179 type = x |
179 type = x |
180 break |
180 break |
181 |
181 |
182 tempname = changegroup.writebundle(cg, None, type) |
182 tempname = changegroup.writebundle(cg, None, type) |
183 fp = url.httpsendfile(self.ui, tempname, "rb") |
183 fp = httpconnection.httpsendfile(self.ui, tempname, "rb") |
184 headers = {'Content-Type': 'application/mercurial-0.1'} |
184 headers = {'Content-Type': 'application/mercurial-0.1'} |
185 |
185 |
186 try: |
186 try: |
187 try: |
187 try: |
188 r = self._call(cmd, data=fp, headers=headers, **args) |
188 r = self._call(cmd, data=fp, headers=headers, **args) |