##// END OF EJS Templates
Proper check to see if zip dest needs to be wrapped in tellable...
Proper check to see if zip dest needs to be wrapped in tellable From hgweb, calling archival.zipit fails with the error message "Illegal seek". This happens because sys.stdout.tell() throws an exception: Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/mercurial/archival.py", line 99, in addfile self.z.writestr(i, data) File "/usr/lib/python2.4/zipfile.py", line 468, in writestr zinfo.header_offset = self.fp.tell() # Start of header bytes Checking whether hasattr(dest, 'tell') is insufficient, because sys.stdout has a tell() method; you just can't call it. This patch instead determines whether a fileobj is tellable by trying to tell(), wrapping the fileobj if an exception is generated.
Colin McMillen -
r2168:dd4ec457 default
Show More
Name Size Modified Last Commit Author
/ mercurial
__init__.py Loading ...
appendfile.py Loading ...
archival.py Loading ...
bdiff.c Loading ...
bundlerepo.py Loading ...
byterange.py Loading ...
changegroup.py Loading ...
changelog.py Loading ...
commands.py Loading ...
demandload.py Loading ...
dirstate.py Loading ...
fancyopts.py Loading ...
filelog.py Loading ...
hg.py Loading ...
hgweb.py Loading ...
httprangereader.py Loading ...
httprepo.py Loading ...
i18n.py Loading ...
localrepo.py Loading ...
lock.py Loading ...
manifest.py Loading ...
mdiff.py Loading ...
mpatch.c Loading ...
node.py Loading ...
packagescan.py Loading ...
remoterepo.py Loading ...
repo.py Loading ...
revlog.py Loading ...
sshrepo.py Loading ...
statichttprepo.py Loading ...
templater.py Loading ...
transaction.py Loading ...
ui.py Loading ...
util.py Loading ...
util_win32.py Loading ...
version.py Loading ...