allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [25/38] git commit: [#6235] use tarball tmp dir from ini, rather than g.tmpdir
Date Mon, 03 Jun 2013 19:19:24 GMT
[#6235] use tarball tmp dir from ini, rather than g.tmpdir


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/e31e5494
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/e31e5494
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/e31e5494

Branch: refs/heads/cj/6218
Commit: e31e549478f9de0c22245d71ca9ce20cf359d0a4
Parents: 9d4285f
Author: Dave Brondsema <dbrondsema@slashdotmedia.com>
Authored: Mon Jun 3 15:48:56 2013 +0000
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Mon Jun 3 15:48:56 2013 +0000

----------------------------------------------------------------------
 ForgeSVN/forgesvn/tests/model/test_repository.py |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/e31e5494/ForgeSVN/forgesvn/tests/model/test_repository.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/model/test_repository.py b/ForgeSVN/forgesvn/tests/model/test_repository.py
index 5840033..01ca3df 100644
--- a/ForgeSVN/forgesvn/tests/model/test_repository.py
+++ b/ForgeSVN/forgesvn/tests/model/test_repository.py
@@ -319,7 +319,8 @@ class TestSVNRepo(unittest.TestCase, RepoImplTestBase):
                               'test-svn-tags-19-tags-tag-1.0/svn-commit.tmp',
                               'test-svn-tags-19-tags-tag-1.0/README'])
         h.set_context('test', 'svn-tags', neighborhood='Projects')
-        tarball_path = os.path.join(g.tmpdir, 'tarball/svn/t/te/test/testsvn-trunk-tags-branches/')
+        tmpdir = tg.config['scm.repos.tarball.root']
+        tarball_path = os.path.join(tmpdir, 'svn/t/te/test/testsvn-trunk-tags-branches/')
         fn = tarball_path + 'test-svn-tags-19-tags-tag-1.0.zip'
         self.svn_tags.tarball(rev, '/tags/tag-1.0/')
         assert os.path.isfile(fn), fn
@@ -353,7 +354,8 @@ class TestSVNRepo(unittest.TestCase, RepoImplTestBase):
                                  'test-svn-tags-19-branches-aaa/svn-commit.tmp',
                                  'test-svn-tags-19-branches-aaa/README'])
         h.set_context('test', 'svn-tags', neighborhood='Projects')
-        tarball_path = os.path.join(g.tmpdir, 'tarball/svn/t/te/test/testsvn-trunk-tags-branches/')
+        tmpdir = tg.config['scm.repos.tarball.root']
+        tarball_path = os.path.join(tmpdir, 'svn/t/te/test/testsvn-trunk-tags-branches/')
         fn = tarball_path + 'test-svn-tags-19-branches-aaa.zip'
         self.svn_tags.tarball(rev, '/branches/aaa/')
         assert os.path.isfile(fn), fn
@@ -388,7 +390,8 @@ class TestSVNRepo(unittest.TestCase, RepoImplTestBase):
                                 'test-svn-tags-19-trunk/ccc.txt',
                                 'test-svn-tags-19-trunk/README'])
         h.set_context('test', 'svn-tags', neighborhood='Projects')
-        tarball_path = os.path.join(g.tmpdir, 'tarball/svn/t/te/test/testsvn-trunk-tags-branches/')
+        tmpdir = tg.config['scm.repos.tarball.root']
+        tarball_path = os.path.join(tmpdir, 'svn/t/te/test/testsvn-trunk-tags-branches/')
         fn = tarball_path + 'test-svn-tags-19-trunk.zip'
         self.svn_tags.tarball(rev, '/trunk/')
         assert os.path.isfile(fn), fn
@@ -410,12 +413,12 @@ class TestSVNRepo(unittest.TestCase, RepoImplTestBase):
         # no path, and no trunk dir
         # expect snapshot of repo root
         h.set_context('test', 'src', neighborhood='Projects')
-        fn = os.path.join(g.tmpdir, 'tarball/svn/t/te/test/testsvn/test-src-1.zip')
+        fn = os.path.join(tmpdir, 'svn/t/te/test/testsvn/test-src-1.zip')
         self.repo.tarball('1')
         assert os.path.isfile(fn), fn
         snapshot = ZipFile(fn, 'r')
         assert_equal(snapshot.namelist(), ['test-src-1/', 'test-src-1/README'])
-        shutil.rmtree(os.path.join(g.tmpdir, 'tarball/svn/t/te/test/testsvn/'), ignore_errors=True)
+        shutil.rmtree(os.path.join(tmpdir, 'svn/t/te/test/testsvn/'), ignore_errors=True)
         shutil.rmtree(tarball_path, ignore_errors=True)
 
     def test_is_empty(self):


Mime
View raw message