#11587 closed defect (fixed)
changeset modification only happens with path
Reported by: | Scott | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Component: | CodeReviewerPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: |
Description
If the page being retrieved is:
http://foo.com/trac/project/changeset/1981
Then I don't see the codereview information on the page.
The page has to include a path after the revision number:
http://foo.com/trac/project/changeset/1981/directory
I tried to debug and saw this for the first case:
2014-02-20 00:24:48,946 Trac[main] DEBUG: Dispatching <RequestWithSession "GET '/changeset/1981'"> 2014-02-20 00:24:48,947 Trac[session] DEBUG: Retrieving session for ID 'shr' 2014-02-20 00:24:48,962 Trac[main] DEBUG: Negotiated locale: None -> en_US 2014-02-20 00:24:48,976 Trac[api] INFO: Synchronized '(default)' repository in 0.03 seconds 2014-02-20 00:24:48,977 Trac[web_ui] DEBUG: codereview pre_process_request
and this for the second (working):
2014-02-20 00:33:52,569 Trac[main] DEBUG: Dispatching <RequestWithSession "GET '/changeset/1981/diretory'"> 2014-02-20 00:33:52,570 Trac[session] DEBUG: Retrieving session for ID 'shr' 2014-02-20 00:33:52,584 Trac[main] DEBUG: Negotiated locale: None -> en_US 2014-02-20 00:33:52,636 Trac[api] INFO: Synchronized '(default)' repository in 0.07 seconds 2014-02-20 00:33:52,636 Trac[web_ui] DEBUG: codereview pre_process_request 2014-02-20 00:33:53,085 Trac[main] DEBUG: Dispatching <RequestWithSession "GET '/coderev/coderev.html'"> 2014-02-20 00:33:53,086 Trac[web_ui] INFO: DEBUG9 path /coderev/coderev.html 2014-02-20 00:33:53,086 Trac[session] DEBUG: Retrieving session for ID 'shr' 2014-02-20 00:33:53,100 Trac[main] DEBUG: Negotiated locale: None -> en_US 2014-02-20 00:33:53,116 Trac[api] INFO: Synchronized '(default)' repository in 0.03 seconds 2014-02-20 00:33:53,116 Trac[web_ui] DEBUG: codereview pre_process_request 2014-02-20 00:33:53,116 Trac[web_ui] DEBUG: codereview process_request 2014-02-20 00:33:53,136 Trac[chrome] DEBUG: Prepare chrome data for request
At that point I got confused. This might be the cause of #11413
Attachments (0)
Change History (7)
comment:1 Changed 11 years ago by
comment:2 Changed 11 years ago by
I figured out that I could work around this issue by changing from a default repository to the new standard way of referencing repositories in Trac.
So I changed my trac.ini from this:
[trac] repository_dir = /sysadm/svn/svip/vlab_svip_ocp repository_type = svn
To this:
[repositories] svn.dir = /sysadm/svn/svip/vlab_svip_ocp svn.type = svn svn.hidden = true .alias = svn
Now the changeset URLs always have "svn" after the number and the plugin works. The alias also means that it redirects from the old bare URLs to the new ones.
Since I couldn't see the plugin getting called at the right times when I tried to debug, I think the bug might be in the core of Trac 1.0 and handling of old default repositories. But this was my first dive into the Trac code, so take that with a huge grain of salt.
It looks weird to call the SVN repository “svn” in the config file (by saying svn.FOO), but it reads normal from the user side: We store our code in 'svn'.
comment:3 Changed 11 years ago by
Owner: | changed from Rob Guttman to Ryan J Ollos |
---|---|
Status: | new → assigned |
I'm glad you have a workaround. I'm not sure when I can get to investigating a proper fix, but I'll keep it on my prioritized list.
comment:6 Changed 9 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
I'm unsure of a better way to handle NULL
s for repo
in the CODEREVIEWER
table and I'd welcome advice on that. I think the better solution may be to store the repository id in the repo
table and do a JOIN
when the repository name is needed, like is done in NODE_CHANGE
and REVISION
.
I noticed this as well while working on #10834.