Mercurial > public > mercurial-scm > hg
comparison mercurial/httprepo.py @ 13115:bda5f35fbf67
httpsendfile: record progress information during read()
This allows us to provide deterministic progress information during
transfer of bundle data over HTTP. This is required because we
currently buffer the bundle data to local disk prior to transfer since
wsgiref lacks chunked transfer-coding support.
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Fri, 10 Dec 2010 13:31:06 -0600 |
parents | ea68947ad0ce |
children | 970150ddaaf8 4e958f2a193f |
comparison
equal
deleted
inserted
replaced
13114:8f29a08e7bbc | 13115:bda5f35fbf67 |
---|---|
158 if x in changegroup.bundletypes: | 158 if x in changegroup.bundletypes: |
159 type = x | 159 type = x |
160 break | 160 break |
161 | 161 |
162 tempname = changegroup.writebundle(cg, None, type) | 162 tempname = changegroup.writebundle(cg, None, type) |
163 fp = url.httpsendfile(tempname, "rb") | 163 fp = url.httpsendfile(self.ui, tempname, "rb") |
164 headers = {'Content-Type': 'application/mercurial-0.1'} | 164 headers = {'Content-Type': 'application/mercurial-0.1'} |
165 | 165 |
166 try: | 166 try: |
167 try: | 167 try: |
168 r = self._call(cmd, data=fp, headers=headers, **args) | 168 r = self._call(cmd, data=fp, headers=headers, **args) |