You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by ke...@apache.org on 2018/01/31 15:13:57 UTC

[1/2] allura git commit: If an entry point is specified incorrectly, provide helpful error message and continue

Repository: allura
Updated Branches:
  refs/heads/master 8666cbb17 -> e7aa4c2a0


If an entry point is specified incorrectly, provide helpful error message and continue


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

Branch: refs/heads/master
Commit: 36dd28047e14ff27e637fb7c04d276c498d69c3c
Parents: 8666cbb
Author: Dave Brondsema <da...@brondsema.net>
Authored: Tue Jan 30 17:33:35 2018 -0500
Committer: Dave Brondsema <da...@brondsema.net>
Committed: Tue Jan 30 17:34:39 2018 -0500

----------------------------------------------------------------------
 Allura/allura/lib/app_globals.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/36dd2804/Allura/allura/lib/app_globals.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/app_globals.py b/Allura/allura/lib/app_globals.py
index 7397638..5453055 100644
--- a/Allura/allura/lib/app_globals.py
+++ b/Allura/allura/lib/app_globals.py
@@ -252,7 +252,10 @@ class Globals(object):
         def _cache_eps(section_name, dict_cls=dict):
             d = dict_cls()
             for ep in h.iter_entry_points(section_name):
-                value = ep.load()
+                try:
+                    value = ep.load()
+                except Exception:
+                    log.exception('Could not load entry point [%s] %s', section_name, ep)
                 d[ep.name] = value
             return d
 


[2/2] allura git commit: Handle repo's upstream fork being gone, rather than whole sidebar being blank

Posted by ke...@apache.org.
Handle repo's upstream fork being gone, rather than whole sidebar being blank


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

Branch: refs/heads/master
Commit: e7aa4c2a006bd82e5f7efee46121ffc205878ffd
Parents: 36dd280
Author: Dave Brondsema <da...@brondsema.net>
Authored: Tue Jan 30 17:34:32 2018 -0500
Committer: Dave Brondsema <da...@brondsema.net>
Committed: Tue Jan 30 17:34:43 2018 -0500

----------------------------------------------------------------------
 Allura/allura/lib/repository.py | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/e7aa4c2a/Allura/allura/lib/repository.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/repository.py b/Allura/allura/lib/repository.py
index dc0b46a..d89f4c2 100644
--- a/Allura/allura/lib/repository.py
+++ b/Allura/allura/lib/repository.py
@@ -141,7 +141,18 @@ class RepositoryApp(Application):
                 SitemapEntry('Forks', c.app.url + 'forks/',
                              small=len(self.repo.forks))
             ]
+
+        has_upstream_repo = False
         if self.repo.upstream_repo.name:
+            try:
+                self.repo.push_upstream_context()
+            except Exception:
+                log.warn('Could not get upstream repo (perhaps it is gone) for: %s %s',
+                         self.repo, self.repo.upstream_repo.name, exc_info=True)
+            else:
+                has_upstream_repo = True
+
+        if has_upstream_repo:
             repo_path_parts = self.repo.upstream_repo.name.strip(
                 '/').split('/')
             links += [