incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [2/7] git commit: [#5076] Added repo_cloned event for post-processing handlers
Date Tue, 30 Oct 2012 20:17:41 GMT
[#5076] Added repo_cloned event for post-processing handlers

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/e643bd56
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/e643bd56
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/e643bd56

Branch: refs/heads/master
Commit: e643bd56dc3286ce51307d12f98fb19948b1cf72
Parents: c59cb17
Author: Cory Johns <johnsca@geek.net>
Authored: Tue Oct 30 16:46:32 2012 +0000
Committer: Cory Johns <johnsca@geek.net>
Committed: Tue Oct 30 16:46:32 2012 +0000

----------------------------------------------------------------------
 ForgeGit/forgegit/model/git_repo.py |    2 ++
 ForgeHg/forgehg/model/hg.py         |    2 ++
 ForgeSVN/forgesvn/model/svn.py      |    3 ++-
 3 files changed, 6 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/e643bd56/ForgeGit/forgegit/model/git_repo.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/model/git_repo.py b/ForgeGit/forgegit/model/git_repo.py
index dba6477..12db065 100644
--- a/ForgeGit/forgegit/model/git_repo.py
+++ b/ForgeGit/forgegit/model/git_repo.py
@@ -10,6 +10,7 @@ from glob import glob
 import tg
 import git
 import gitdb
+from pylons import g
 from pymongo.errors import DuplicateKeyError
 
 from ming.base import Object
@@ -111,6 +112,7 @@ class GitImplementation(M.RepositoryImplementation):
             raise
         log.info('... %r cloned', self._repo)
         self._repo.refresh(notify=False)
+        g.post_event('repo_cloned')
 
     def commit(self, rev):
         '''Return a Commit object.  rev can be _id or a branch/tag name'''

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/e643bd56/ForgeHg/forgehg/model/hg.py
----------------------------------------------------------------------
diff --git a/ForgeHg/forgehg/model/hg.py b/ForgeHg/forgehg/model/hg.py
index 726b4ae..c1fe85d 100644
--- a/ForgeHg/forgehg/model/hg.py
+++ b/ForgeHg/forgehg/model/hg.py
@@ -8,6 +8,7 @@ from cStringIO import StringIO
 from ConfigParser import ConfigParser
 
 import tg
+from pylons import g
 os.environ['HGRCPATH'] = '' # disable loading .hgrc
 from mercurial import ui, hg
 from pymongo.errors import DuplicateKeyError
@@ -98,6 +99,7 @@ class HgImplementation(M.RepositoryImplementation):
             raise
         log.info('... %r cloned', self._repo)
         self._repo.refresh(notify=False)
+        g.post_event('repo_cloned')
 
     def commit(self, rev):
         '''Return a Commit object.  rev can be _id or a branch/tag name'''

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/e643bd56/ForgeSVN/forgesvn/model/svn.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/model/svn.py b/ForgeSVN/forgesvn/model/svn.py
index 93b7cb6..4b69b92 100644
--- a/ForgeSVN/forgesvn/model/svn.py
+++ b/ForgeSVN/forgesvn/model/svn.py
@@ -17,7 +17,7 @@ import pylons
 pylons.c = pylons.tmpl_context
 pylons.g = pylons.app_globals
 from pymongo.errors import DuplicateKeyError
-from pylons import c
+from pylons import c, g
 
 from ming.base import Object
 from ming.orm import Mapper, FieldProperty, session
@@ -190,6 +190,7 @@ class SVNImplementation(M.RepositoryImplementation):
             c.app.config.options['checkout_url'] = ""
         self._repo.refresh(notify=False)
         self._setup_special_files(source_url)
+        g.post_event('repo_cloned')
 
     def refresh_heads(self):
         info = self._svn.info2(


Mime
View raw message