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 3D8AA10232 for ; Thu, 30 Jan 2014 23:15:27 +0000 (UTC) Received: (qmail 98045 invoked by uid 500); 30 Jan 2014 23:15:26 -0000 Delivered-To: apmail-incubator-allura-commits-archive@incubator.apache.org Received: (qmail 97999 invoked by uid 500); 30 Jan 2014 23:15:26 -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 97981 invoked by uid 99); 30 Jan 2014 23:15:25 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Jan 2014 23:15:25 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 7F93C91695F; Thu, 30 Jan 2014 23:15:25 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: brondsem@apache.org To: allura-commits@incubator.apache.org Date: Thu, 30 Jan 2014 23:15:26 -0000 Message-Id: <6c01ddb7416e49feb4ef8a2890cbf26a@git.apache.org> In-Reply-To: <4be312b0117249e3bc384ce184672499@git.apache.org> References: <4be312b0117249e3bc384ce184672499@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [2/2] git commit: [#7118] Better handling for GitHub wiki import errors [#7118] Better handling for GitHub wiki import errors 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/1d8f6c8a Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/1d8f6c8a Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/1d8f6c8a Branch: refs/heads/master Commit: 1d8f6c8a087d267ade34262445c9b06680267a46 Parents: 38c10a6 Author: Cory Johns Authored: Thu Jan 30 21:11:11 2014 +0000 Committer: Cory Johns Committed: Thu Jan 30 22:55:56 2014 +0000 ---------------------------------------------------------------------- ForgeImporters/forgeimporters/github/wiki.py | 22 +++++++++++++++++----- requirements-sf.txt | 4 ++-- 2 files changed, 19 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/1d8f6c8a/ForgeImporters/forgeimporters/github/wiki.py ---------------------------------------------------------------------- diff --git a/ForgeImporters/forgeimporters/github/wiki.py b/ForgeImporters/forgeimporters/github/wiki.py index 99333f7..1891da7 100644 --- a/ForgeImporters/forgeimporters/github/wiki.py +++ b/ForgeImporters/forgeimporters/github/wiki.py @@ -143,14 +143,15 @@ class GitHubWikiImporter(ToolImporter): available_pages = [] def import_tool( - self, project, user, project_name=None, mount_point=None, mount_label=None, user_name=None, - tool_option=None, **kw): + self, project, user, project_name=None, mount_point=None, + mount_label=None, user_name=None, tool_option=None, **kw): """ Import a GitHub wiki into a new Wiki Allura tool. """ project_name = "%s/%s" % (user_name, project_name) extractor = GitHubProjectExtractor(project_name, user=user) - if not extractor.has_wiki(): + wiki_avail = extractor.has_wiki() + if not wiki_avail: return self.github_wiki_url = extractor.get_page_url( @@ -171,8 +172,19 @@ class GitHubWikiImporter(ToolImporter): try: M.session.artifact_orm_session._get().skip_mod_date = True with h.push_config(c, app=self.app): - self.import_pages( - extractor.get_page_url('wiki_url'), history=with_history) + try: + wiki_url = extractor.get_page_url('wiki_url') + self.import_pages(wiki_url, history=with_history) + except git.GitCommandError: + log.error( + 'Unable to clone GitHub wiki: ' + 'wiki_url=%s; ' + 'wiki_avail=%s; ' + 'avail_url=%s', + wiki_url, wiki_avail, + extractor.get_page_url('project_info'), + exc_info=True) + raise ThreadLocalORMSession.flush_all() M.AuditLog.log( 'import tool %s from %s on %s' % ( http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/1d8f6c8a/requirements-sf.txt ---------------------------------------------------------------------- diff --git a/requirements-sf.txt b/requirements-sf.txt index 8c6c040..b54c0c0 100644 --- a/requirements-sf.txt +++ b/requirements-sf.txt @@ -24,9 +24,9 @@ TracWikiImporter==0.3.6 MediawikiImporter==0.0.2 Unidecode==0.04.14 -# use version built from https://github.com/johnsca/GitPython/commits/tv/6000 +# use version built from https://github.com/johnsca/GitPython/tree/sf-master # for unmerged fixes for [#5411], [#6000], and [#6078] -GitPython==0.3.2.RC1-20131017 +GitPython==0.3.2.RC1-20140130 WebError==0.10.3-20130423