Opened 15 years ago
Closed 11 years ago
#7034 closed defect (fixed)
Error in Section 2:AttributeError: 'NoneType' object has no attribute 'youngest_rev'
Reported by: | Owned by: | Ryan J Ollos | |
---|---|---|---|
Priority: | normal | Component: | PeerReviewPlugin |
Severity: | normal | Keywords: | |
Cc: | f_develop@…, Kevin Fenzi, bunk@…, Olemis Lang | Trac Release: | 0.12 |
Description (last modified by )
We are currently using 0.12dev version
Preconditions: I do have corresponding Review rights and Plugin is enabled.
Repro steps:
- select Peer Review
- Select Create Code Review
- System is trying to load data in Section: "Step 2: Select the sections to be reviewed." and reports an error:
Trac detected an internal error: AttributeError: 'NoneType' object has no attribute 'youngest_rev'
Attachments (2)
Change History (19)
Changed 14 years ago by
Attachment: | codereview.patch added |
---|
comment:3 Changed 14 years ago by
ok, i retract that last statement, i believe i do not know how to apply patches properly. any information about how to do this would be appreciated.
comment:4 Changed 14 years ago by
Try the following patch. It is not a "nice" patch, as it pulls back some removed template code from Trac. But it can be used as a temporary work-around.
diff -ru 2.2-orig/codereview/peerReviewBrowser.py 2.2-new/codereview/peerReviewBrowser.py --- 2.2-orig/codereview/peerReviewBrowser.py 2011-04-27 17:04:47.000000000 +0800 +++ 2.2-new/codereview/peerReviewBrowser.py 2011-04-27 17:05:12.000000000 +0800 @@ -87,7 +87,7 @@ path = req.args.get('path', '/') rev = req.args.get('rev') - repos = self.env.get_repository(req.authname) + repos = self.env.get_repository(authname=req.authname) try: node = get_existing_node(self.env, repos, path, rev) diff -ru 2.2-orig/codereview/peerReviewPerform.py 2.2-new/codereview/peerReviewPerform.py --- 2.2-orig/codereview/peerReviewPerform.py 2011-04-27 17:04:47.000000000 +0800 +++ 2.2-new/codereview/peerReviewPerform.py 2011-04-27 17:05:13.000000000 +0800 @@ -131,7 +131,7 @@ return 'error.cs', data, None #get the respository - repos = self.env.get_repository(req.authname) + repos = self.env.get_repository(authname=req.authname) #get the file attributes data['review_path'] = resultFile.Path data['review_version'] = resultFile.Version diff -ru 2.2-orig/codereview/templates/peerReviewBrowser.html 2.2-new/codereview/templates/peerReviewBrowser.html --- 2.2-orig/codereview/templates/peerReviewBrowser.html 2011-04-27 17:04:47.000000000 +0800 +++ 2.2-new/codereview/templates/peerReviewBrowser.html 2011-04-27 17:05:13.000000000 +0800 @@ -18,6 +18,18 @@ </py:def> <div id="content" class="browser"> + <py:def function="browser_path_links(path_links,rev=None)"> + <py:for each="idx, part in enumerate(path_links)"><py:with + vars="first = idx == 0; last = idx == len(path_links) - 1"><a + class="${classes('pathentry', first=first)}" + title="${first and _('Go to root directory') or _('View %(folder)s', folder=part.name)}" + href="$part.href">$part.name</a><py:if + test="not last"><span class="pathentry sep">/</span></py:if></py:with></py:for> + <py:if test="rev"><span class="pathentry sep">@</span> + <a class="pathentry" href="${href.changeset(rev)}" title="View changeset $rev">$rev</a> + </py:if> + <br style="clear: both" /> + </py:def> <h2>${browser_path_links(path_links, stickyrev)}</h2> <div id="jumprev"> @@ -127,4 +139,4 @@ </div> </body> -</html> \ No newline at end of file +</html>
comment:5 Changed 13 years ago by
Cc: | Kevin Fenzi added |
---|
Neither one of these seems to work here. ;(
trac 0.12.2
I always get the error. ideas or things to try welcome.
comment:6 Changed 13 years ago by
Description: | modified (diff) |
---|
comment:7 Changed 13 years ago by
Change the repository name to empty (so it will the default repository).
comment:9 Changed 12 years ago by
Cc: | bunk@… added |
---|
comment:10 Changed 12 years ago by
I can confirm that this plugin doesn't support multiple repositories and as such requires a default repository (I had to restart apache as well). The patches are useless.
comment:11 Changed 12 years ago by
a combination of both patches worked for me - multiple-repo.patch
Changed 12 years ago by
Attachment: | multiple-repo.patch added |
---|
solves repository=None problem in trac 0.12.2
comment:12 Changed 12 years ago by
Cc: | Olemis Lang added |
---|
comment:13 Changed 12 years ago by
Owner: | changed from mikechml to Ryan J Ollos |
---|---|
Status: | new → assigned |
comment:14 Changed 12 years ago by
Status: | assigned → new |
---|
comment:17 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
I believe it will work now if a (default) repository is defined. In the future we'll need to add support for multiple repositories.
CoderReview patch for 0.12