Mercurial > hg > mercurial-crew-with-dirclash
comparison mercurial/hgweb.py @ 1165:04be5eb73bb3
Fixed import needed to serve zip files which broke because of other changes.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Tue, 30 Aug 2005 19:12:17 +0200 |
parents | dacd3463ee3f |
children | 85555540a4e2 |
comparison
equal
deleted
inserted
replaced
1164:cf8185cf2a70 | 1165:04be5eb73bb3 |
---|---|
661 | 661 |
662 files = mf.keys() | 662 files = mf.keys() |
663 files.sort() | 663 files.sort() |
664 | 664 |
665 if type == 'zip': | 665 if type == 'zip': |
666 import zipfile | 666 import zipfile, tempfile |
667 | 667 |
668 tmp = tempfile.mkstemp()[1] | |
668 try: | 669 try: |
669 tmp = tempfile.mkstemp()[1] | |
670 zf = zipfile.ZipFile(tmp, "w", zipfile.ZIP_DEFLATED) | 670 zf = zipfile.ZipFile(tmp, "w", zipfile.ZIP_DEFLATED) |
671 | 671 |
672 for f in files: | 672 for f in files: |
673 zf.writestr(name + f, self.repo.file(f).read(mf[f])) | 673 zf.writestr(name + f, self.repo.file(f).read(mf[f])) |
674 zf.close() | 674 zf.close() |