| | |
| | | */
|
| | | package com.gitblit.utils;
|
| | |
|
| | | import java.io.ByteArrayOutputStream;
|
| | | import java.io.IOException;
|
| | | import java.io.OutputStream;
|
| | | import java.text.MessageFormat;
|
| | |
| | | import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream;
|
| | | import org.apache.commons.compress.compressors.CompressorException;
|
| | | import org.apache.commons.compress.compressors.CompressorStreamFactory;
|
| | | import org.apache.wicket.util.io.ByteArrayOutputStream;
|
| | | import org.eclipse.jgit.lib.Constants;
|
| | | import org.eclipse.jgit.lib.FileMode;
|
| | | import org.eclipse.jgit.lib.MutableObjectId;
|
| | |
| | | } catch (IOException e) {
|
| | | error(e, repository, "{0} failed to zip files from commit {1}", commit.getName());
|
| | | } finally {
|
| | | tw.release();
|
| | | tw.close();
|
| | | rw.dispose();
|
| | | }
|
| | | return success;
|
| | |
| | | } catch (IOException e) {
|
| | | error(e, repository, "{0} failed to {1} stream files from commit {2}", algorithm, commit.getName());
|
| | | } finally {
|
| | | tw.release();
|
| | | tw.close();
|
| | | rw.dispose();
|
| | | }
|
| | | return success;
|