allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tvansteenbu...@apache.org
Subject git commit: Update post-clone events for Hg and Svn
Date Tue, 06 Nov 2012 13:41:26 GMT
Updated Branches:
  refs/heads/tv/5230 789152224 -> dda8d5246


Update post-clone events for Hg and Svn


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

Branch: refs/heads/tv/5230
Commit: dda8d52461abd69bd2c65eb4360b7d1a035a13cb
Parents: 7891522
Author: Tim Van Steenburgh <tvansteenburgh@gmail.com>
Authored: Tue Nov 6 13:41:05 2012 +0000
Committer: Tim Van Steenburgh <tvansteenburgh@gmail.com>
Committed: Tue Nov 6 13:41:05 2012 +0000

----------------------------------------------------------------------
 ForgeHg/forgehg/model/hg.py    |    4 +++-
 ForgeSVN/forgesvn/model/svn.py |    3 ++-
 2 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/dda8d524/ForgeHg/forgehg/model/hg.py
----------------------------------------------------------------------
diff --git a/ForgeHg/forgehg/model/hg.py b/ForgeHg/forgehg/model/hg.py
index 0212b4d..7e00971 100644
--- a/ForgeHg/forgehg/model/hg.py
+++ b/ForgeHg/forgehg/model/hg.py
@@ -2,6 +2,7 @@ import os
 import re
 import shutil
 import logging
+import traceback
 from binascii import b2a_hex
 from datetime import datetime
 from cStringIO import StringIO
@@ -94,11 +95,12 @@ class HgImplementation(M.RepositoryImplementation):
             self.__dict__['_hg'] = repo
             self._setup_special_files(source_url)
         except:
+            g.post_event('repo_clone_failed', source_url, traceback.format_exc())
             self._repo.status = 'raise'
             session(self._repo).flush(self._repo)
             raise
         log.info('... %r cloned', self._repo)
-        g.post_event('repo_cloned')
+        g.post_event('repo_cloned', source_url)
         self._repo.refresh(notify=False)
 
     def commit(self, rev):

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/dda8d524/ForgeSVN/forgesvn/model/svn.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/model/svn.py b/ForgeSVN/forgesvn/model/svn.py
index e8173d8..85b4670 100644
--- a/ForgeSVN/forgesvn/model/svn.py
+++ b/ForgeSVN/forgesvn/model/svn.py
@@ -169,6 +169,7 @@ class SVNImplementation(M.RepositoryImplementation):
             p = Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=PIPE)
             stdout, stderr = p.communicate(input='p\n')
             if p.returncode != 0:
+                g.post_event('repo_clone_failed', source_url, stderr)
                 self._repo.status = 'ready'
                 session(self._repo).flush(self._repo)
                 raise SVNCalledProcessError(cmd, p.returncode, stdout, stderr)
@@ -186,7 +187,7 @@ class SVNImplementation(M.RepositoryImplementation):
                           c.app.config.options['checkout_url'])):
             c.app.config.options['checkout_url'] = ""
         self._setup_special_files(source_url)
-        g.post_event('repo_cloned')
+        g.post_event('repo_cloned', source_url)
         self._repo.refresh(notify=False)
 
     def refresh_heads(self):


Mime
View raw message