Return-Path: X-Original-To: apmail-incubator-allura-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-allura-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6493CECB1 for ; Wed, 6 Mar 2013 23:03:55 +0000 (UTC) Received: (qmail 2328 invoked by uid 500); 6 Mar 2013 23:03:55 -0000 Delivered-To: apmail-incubator-allura-commits-archive@incubator.apache.org Received: (qmail 2308 invoked by uid 500); 6 Mar 2013 23:03:55 -0000 Mailing-List: contact allura-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: allura-dev@incubator.apache.org Delivered-To: mailing list allura-commits@incubator.apache.org Received: (qmail 2297 invoked by uid 99); 6 Mar 2013 23:03:55 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Mar 2013 23:03:55 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 07360830FA6; Wed, 6 Mar 2013 23:03:55 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: johnsca@apache.org To: allura-commits@incubator.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [1/2] git commit: [#5557] Clean up created pre-revprop-change hook after sync Message-Id: <20130306230355.07360830FA6@tyr.zones.apache.org> Date: Wed, 6 Mar 2013 23:03:55 +0000 (UTC) [#5557] Clean up created pre-revprop-change hook after sync Signed-off-by: Cory Johns 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 Authored: Wed Mar 6 23:02:40 2013 +0000 Committer: Cory Johns 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" %