Mercurial > public > mercurial-scm > hg
comparison mercurial/httprepo.py @ 3566:ca24144ed850
Force the content-length header to be a string in httprepo.unbundle.
(Needed for Python2.3 compatibility)
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Fri, 27 Oct 2006 18:30:53 +0200 |
parents | 9073d7366776 |
children | 3bab1fc0ab75 |
comparison
equal
deleted
inserted
replaced
3565:9073d7366776 | 3566:ca24144ed850 |
---|---|
337 fp.write(chunk) | 337 fp.write(chunk) |
338 length = fp.tell() | 338 length = fp.tell() |
339 try: | 339 try: |
340 rfp = self.do_cmd( | 340 rfp = self.do_cmd( |
341 'unbundle', data=fp, | 341 'unbundle', data=fp, |
342 headers={'content-length': length, | 342 headers={'content-length': str(length), |
343 'content-type': 'application/octet-stream'}, | 343 'content-type': 'application/octet-stream'}, |
344 heads=' '.join(map(hex, heads))) | 344 heads=' '.join(map(hex, heads))) |
345 try: | 345 try: |
346 ret = int(rfp.readline()) | 346 ret = int(rfp.readline()) |
347 self.ui.write(rfp.read()) | 347 self.ui.write(rfp.read()) |