[#6580] Make SVN quieter when building snapshots
Signed-off-by: Cory Johns <cjohns@slashdotmedia.com>
diff --git a/Allura/allura/model/repository.py b/Allura/allura/model/repository.py
index 9db3747..3fe5a80 100644
--- a/Allura/allura/model/repository.py
+++ b/Allura/allura/model/repository.py
@@ -740,7 +740,7 @@
# this is needed to get proper prefixes inside zip-file
working_dir = os.path.dirname(source)
source_fn = os.path.basename(source)
- command = [zipbin, '-r', zipfile, source_fn]
+ command = [zipbin, '-y', '-q', '-r', zipfile, source_fn]
if exclude:
command += ['-x', exclude]
p = Popen(command, cwd=working_dir, stdout=PIPE, stderr=PIPE)
diff --git a/Allura/allura/tests/unit/test_repo.py b/Allura/allura/tests/unit/test_repo.py
index 499f604..0cdd65a 100644
--- a/Allura/allura/tests/unit/test_repo.py
+++ b/Allura/allura/tests/unit/test_repo.py
@@ -299,13 +299,13 @@
src = '/fake/path/to/repo'
zipfile = '/fake/zip/file.tmp'
zipdir(src, zipfile)
- popen.assert_called_once_with(['/bin/zip', '-r', zipfile, 'repo'],
+ popen.assert_called_once_with(['/bin/zip', '-y', '-q', '-r', zipfile, 'repo'],
cwd='/fake/path/to', stdout=PIPE, stderr=PIPE)
popen.reset_mock()
src = '/fake/path/to/repo/'
zipdir(src, zipfile, exclude='file.txt')
popen.assert_called_once_with(
- ['/bin/zip', '-r', zipfile, 'repo', '-x', 'file.txt'],
+ ['/bin/zip', '-y', '-q', '-r', zipfile, 'repo', '-x', 'file.txt'],
cwd='/fake/path/to', stdout=PIPE, stderr=PIPE)
@patch('allura.model.repository.Popen')
@@ -321,7 +321,7 @@
emsg = str(cm.exception)
self.assertTrue(
"Command: "
- "['/bin/zip', '-r', '/fake/zip/file.tmp', 'repo'] "
+ "['/bin/zip', '-y', '-q', '-r', '/fake/zip/file.tmp', 'repo'] "
"returned non-zero exit code 1" in emsg)
self.assertTrue("STDOUT: 1" in emsg)
self.assertTrue("STDERR: 2" in emsg)