You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by jo...@apache.org on 2012/10/26 00:30:01 UTC
[12/12] git commit: [#5129] don't do push_context and its lookups
during a __repr__
[#5129] don't do push_context and its lookups during a __repr__
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/1807f4cf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/1807f4cf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/1807f4cf
Branch: refs/heads/cj/5076
Commit: 1807f4cf07fe643976847af93082ac96ef778668
Parents: 71eaa53
Author: Dave Brondsema <db...@geek.net>
Authored: Tue Oct 16 21:39:54 2012 +0000
Committer: Dave Brondsema <db...@geek.net>
Committed: Tue Oct 16 21:39:54 2012 +0000
----------------------------------------------------------------------
Allura/allura/model/index.py | 13 +++----------
1 files changed, 3 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/1807f4cf/Allura/allura/model/index.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/index.py b/Allura/allura/model/index.py
index 8d82b00..736a1e1 100644
--- a/Allura/allura/model/index.py
+++ b/Allura/allura/model/index.py
@@ -93,16 +93,9 @@ class Shortlink(object):
re_link_2 = re.compile(r'^' + _core_re, re.VERBOSE)
def __repr__(self):
- with h.push_context(self.project_id):
- if self.app_config:
- return '[%s:%s:%s] -> %s' % (
- self.project.shortname,
- self.app_config.options.mount_point,
- self.link,
- self.ref_id)
- else:
- return '[%s:*:%s] -> %s' % (
- self.project.shortname,
+ return '<Shortlink %s %s %s -> %s>' % (
+ self.project_id,
+ self.app_config_id,
self.link,
self.ref_id)