allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [1/2] git commit: [#5557] Clean up created pre-revprop-change hook after sync
Date Wed, 06 Mar 2013 23:03:55 GMT
[#5557] Clean up created pre-revprop-change hook after sync

Signed-off-by: Cory Johns <johnsca@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/8b83b077
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/8b83b077
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/8b83b077

Branch: refs/heads/cj/5557
Commit: 8b83b07747977fd830186c0a7c2d83cd13b5965d
Parents: c5f397a
Author: Cory Johns <johnsca@geek.net>
Authored: Wed Mar 6 23:02:40 2013 +0000
Committer: Cory Johns <johnsca@geek.net>
Committed: Wed Mar 6 23:02:40 2013 +0000

----------------------------------------------------------------------
 ForgeSVN/forgesvn/model/svn.py |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/8b83b077/ForgeSVN/forgesvn/model/svn.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/model/svn.py b/ForgeSVN/forgesvn/model/svn.py
index cdafa9d..98fb86e 100644
--- a/ForgeSVN/forgesvn/model/svn.py
+++ b/ForgeSVN/forgesvn/model/svn.py
@@ -222,6 +222,11 @@ class SVNImplementation(M.RepositoryImplementation):
                 fp.write('#!/bin/sh\n')
             os.chmod(fn, 0755)
 
+        def clear_hook(hook_name):
+            fn = os.path.join(self._repo.fs_path, self._repo.name,
+                              'hooks', hook_name)
+            os.remove(fn)
+
         self._repo.status = 'importing'
         session(self._repo).flush(self._repo)
         log.info('Initialize %r as a clone of %s',
@@ -241,10 +246,12 @@ class SVNImplementation(M.RepositoryImplementation):
             set_hook('pre-revprop-change')
             self.check_call(['svnsync', '--non-interactive', '--allow-non-empty',
               'initialize', self._url, source_url])
+            clear_hook('pre-revprop-change')
         else:
             set_hook('pre-revprop-change')
             self.check_call(['svnsync', 'init', self._url, source_url])
             self.check_call(['svnsync', '--non-interactive', 'sync', self._url])
+            clear_hook('pre-revprop-change')
 
         log.info('... %r cloned', self._repo)
         if not svn_path_exists("file://%s%s/%s" %


Mime
View raw message