You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by jo...@apache.org on 2013/03/07 00:03:54 UTC

[2/2] git commit: [#5557] Remove permissive pre-revprop-change for new commits to not allow history change by default

Updated Branches:
  refs/heads/cj/5557 [created] 7f297c332


[#5557] Remove permissive pre-revprop-change for new commits to not allow history change by default

Signed-off-by: Cory Johns <jo...@geek.net>


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

Branch: refs/heads/cj/5557
Commit: 7f297c3324331316ab69668357167d2f8170121e
Parents: 8b83b07
Author: Cory Johns <jo...@geek.net>
Authored: Wed Mar 6 23:03:37 2013 +0000
Committer: Cory Johns <jo...@geek.net>
Committed: Wed Mar 6 23:03:37 2013 +0000

----------------------------------------------------------------------
 ForgeSVN/forgesvn/model/svn.py                   |    8 --------
 ForgeSVN/forgesvn/tests/model/test_repository.py |   10 ++--------
 2 files changed, 2 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/7f297c33/ForgeSVN/forgesvn/model/svn.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/model/svn.py b/ForgeSVN/forgesvn/model/svn.py
index 98fb86e..f4e85c0 100644
--- a/ForgeSVN/forgesvn/model/svn.py
+++ b/ForgeSVN/forgesvn/model/svn.py
@@ -522,14 +522,6 @@ class SVNImplementation(M.RepositoryImplementation):
         with open(fn, 'wb') as fp:
             fp.write(text)
         os.chmod(fn, 0755)
-        # create a blank pre-revprop-change file if one doesn't
-        # already exist to allow remote modification of revision
-        # properties (see http://svnbook.red-bean.com/en/1.1/ch05s02.html)
-        fn = os.path.join(self._repo.fs_path, self._repo.name, 'hooks', 'pre-revprop-change')
-        if not os.path.exists(fn):
-            with open(fn, 'wb') as fp:
-                fp.write('#!/bin/sh\n')
-            os.chmod(fn, 0755)
 
     def _revno(self, oid):
         return int(oid.split(':')[1])

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/7f297c33/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 2e32676..5174c00 100644
--- a/ForgeSVN/forgesvn/tests/model/test_repository.py
+++ b/ForgeSVN/forgesvn/tests/model/test_repository.py
@@ -131,10 +131,7 @@ class TestSVNRepo(unittest.TestCase, RepoImplTestBase):
             shutil.rmtree(dirname)
         repo.init()
         repo._impl.clone_from('file://' + repo_path)
-        assert os.path.exists('/tmp/testsvn/hooks/pre-revprop-change')
-        assert os.access('/tmp/testsvn/hooks/pre-revprop-change', os.X_OK)
-        with open('/tmp/testsvn/hooks/pre-revprop-change') as f: c = f.read()
-        self.assertEqual(c, '#!/bin/sh\n')
+        assert not os.path.exists('/tmp/testsvn/hooks/pre-revprop-change')
         assert os.path.exists('/tmp/testsvn/hooks/post-commit')
         assert os.access('/tmp/testsvn/hooks/post-commit', os.X_OK)
         with open('/tmp/testsvn/hooks/post-commit') as f: c = f.read()
@@ -180,10 +177,7 @@ class TestSVNRepo(unittest.TestCase, RepoImplTestBase):
             shutil.rmtree(dirname)
         repo.init()
         repo._impl.clone_from('file://' + repo_path)
-        assert os.path.exists('/tmp/testsvn/hooks/pre-revprop-change')
-        assert os.access('/tmp/testsvn/hooks/pre-revprop-change', os.X_OK)
-        with open('/tmp/testsvn/hooks/pre-revprop-change') as f: c = f.read()
-        self.assertEqual(c, '#!/bin/sh\n')
+        assert not os.path.exists('/tmp/testsvn/hooks/pre-revprop-change')
         assert os.path.exists('/tmp/testsvn/hooks/post-commit')
         assert os.access('/tmp/testsvn/hooks/post-commit', os.X_OK)
         with open('/tmp/testsvn/hooks/post-commit') as f: c = f.read()