Code Review Plugin 0.2.7 Released.

Added by Haruyuki Iida about 12 years ago

Code Review Plugin 0.2.7 Released.
If you use Redmine 0.8.7, you must upgrade to 0.2.7.

http://r-labs.googlecode.com/files/redmine_code_review-0.2.7.zip

Features:

  • Compatible with Redmine 0.8.7
  • Now code review dialog is resizable.
  • Added link to preview.
  • Compatible with development mode(experimental)

Regards.

Replies (103)

RE: Code Review 3.1 -- How do I change the line spacing to closly match the font used for code views - Added by Steven Risner over 11 years ago

The pygments plugin does not have a disable switch. I'm not sure if I can remove it without incurring system downtime, however I suspect you are right.
  1. The side-by-side diffs do not get syntax highlighting and appear normal.
  2. I discovered last week that the line spacing is screwy on projects that do not have the code review plugin enabled.

I will have a look at the pygments plug.

Code Review 3.1 -- Installation help (newbie) - Added by Ezequiel Naftali over 11 years ago

Hi,
I´m having problems installing the code review plugin. I copied the plugin to the vendor directory
and when I run the rakefile I get this:
@
C:\Program Files\BitNami Redmine Stack\ruby\bin>rake -f "C:\Program Files\BitNam
i Redmine Stack\apps\redmine\vendor\plugins\redmine_code_review\rakefile" rake
db:migrate_plugins RAILS_ENV=production
(in C:/Program Files/BitNami Redmine Stack/ruby/bin)
rake aborted!
No such file or directory - init.rb

(See full trace by running task with --trace)

C:\Program Files\BitNami Redmine Stack\ruby\bin>@

RE: Code Review 3.1 -- Installation help (newbie) - Added by Haruyuki Iida over 11 years ago

Hi Ezequiel.

You specified a wrong rakefile for database migration.
You must specify the Redmine's one. Not a plugin's.

try

rake -f "C:\Program Files\BitNami Redmine Stack\apps\redmine\Rakefile" db:migrate_plugins RAILS_ENV=production --trace

RE: Code Review Plugin 0.2.7 Released. - Added by Ezequiel Naftali over 11 years ago

Thanks Haru, its working now!

RE: Code Review 3.1 -- How do I change the line spacing to closly match the font used for code views - Added by Haruyuki Iida over 11 years ago

Steven Risner wrote:

I will have a look at the pygments plug.

Hi Steven.

I found how to fix the pygments plugin.

Change redmine_repo_pygments/lib/repo_pygments_application_helper_patch.rb: line 24 from

@code_css = "highlight"

to

@code_css = "line-code highlight"

and change redmine_repo_pygments/lib/python_code/pyscm.py: line 50 from

pattern_str = '^<div\sclass=\"highlight\"><pre>(.*</span>)'

to

pattern_str = '^<div\sclass=\"line-code highlight\"><pre>(.*</span>)'

Then it works. Try this.

RE: Code Review Plugin 0.2.7 Released. - Added by André Jonsson over 11 years ago

I'm only getting this to work for the "admin" user. No other user can see the pen icons. Can't find anyone else mentioning this so I must be doing something wrong... Any ideas?

RE: Code Review Plugin 0.2.7 Released. - Added by André Jonsson over 11 years ago

André Jonsson wrote:

I'm only getting this to work for the "admin" user. No other user can see the pen icons. Can't find anyone else mentioning this so I must be doing something wrong... Any ideas?

Scratch that. N00b redmine admin at work :-/ I hadn't checked the code review permission boxes. Never mind.

RE: Code Review Plugin 0.2.7 Released. - Added by Steven Risner over 11 years ago

Thanks Haru

You saved me a lot of time.

Haru Iida wrote:

Change redmine_repo_pygments/lib/repo_pygments_application_helper_patch.rb: line 24 to
@code_css = "line-code highlight" 

change redmine_repo_pygments/lib/python_code/pyscm.py: line 50 to
pattern_str = '^<div\sclass=\"line-code highlight\"><pre>(.*</span>)'

</pre>

You should put this fix in a readme or on your plugin page.

Code Review Plugin 0.3.1 — cannot get it work - Added by Nox Metus over 11 years ago

I successfully managed to install the latest version of the plugin. I added the code review module to my project, I changed roles and permissions for my role to be able to do anything with code reviews. I can see and enjoy nice review tabs in the project page and in the project settings tabs. I can see and use “Review assignments: Add” button. BUT!... there is no edit icon whatsoever anywhere in the repository browser as it is described here. And therefore I cannot right reviews. What is wrong?

I use Redmine 0.9.3.stable with PostgreSQL 8.4.

RE: Code Review Plugin 0.3.1 — cannot get it work - Added by Haruyuki Iida over 11 years ago

Nox Metus wrote:

I successfully managed to install the latest version of the plugin. I added the code review module to my project, I changed roles and permissions for my role to be able to do anything with code reviews. I can see and enjoy nice review tabs in the project page and in the project settings tabs. I can see and use “Review assignments: Add” button. BUT!... there is no edit icon whatsoever anywhere in the repository browser as it is described here. And therefore I cannot right reviews. What is wrong?

Hi, Nox.

I think it's a same case with this one. http://www.redmine.org/boards/3/topics/9627?r=15657#message-15657

RE: Code Review Plugin 0.3.1 — cannot get it work - Added by Nox Metus over 11 years ago

Haru Iida wrote:

Hi, Nox.

I think it's a same case with this one. http://www.redmine.org/boards/3/topics/9627?r=15657#message-15657

Unfortunately, it is not. I've seen that message. And I set the full permission for everyone to this folder just in case:

ave@arcanum-squid:~$ ls -lA /usr/share/redmine/public/
total 40
-rw-r--r-- 1 root root  484 2010-02-28 16:28 404.html
-rw-r--r-- 1 root root  576 2010-02-28 16:28 500.html
-rwxr-xr-x 1 root root  971 2010-03-23 10:23 dispatch.fcgi
-rwxr-xr-x 1 root root  477 2010-02-28 16:28 dispatch.rb.example
-rw-r--r-- 1 root root    0 2010-02-28 16:28 favicon.ico
drwxr-xr-x 2 root root 4096 2010-09-05 03:20 help
drwxr-xr-x 4 root root 4096 2010-09-05 03:20 images
drwxr-xr-x 4 root root 4096 2010-09-05 03:20 javascripts
drwxrwxrwx 2 root root 4096 2010-09-06 16:19 plugin_assets
drwxr-xr-x 2 root root 4096 2010-09-05 03:20 stylesheets
drwxr-xr-x 5 root root 4096 2010-09-05 18:42 themes

Code Review Plugin 0.3.1 — cannot get it work - Added by Nox Metus about 11 years ago

I reinstalled everything from scratch, beginning from db server, then redmine, code review plugin, restored database, added code review module to the project, tuned permissions for code reviewing. The result is still the same: there is no edit icon whatsoever anywhere in the repository browser. What is wrong?

RE: Code Review Plugin 0.3.1 — cannot get it work - Added by Nox Metus about 11 years ago

I've solved the problem by creating manually a folder public/plugin_assets/redmine_code_review and then copying there the contents of vendor/plugins/redmine_code_review/assets.

RE: Code Review Plugin 0.3.1 — cannot get it work - Added by Terence Mill about 11 years ago

Nox Metus wrote:

I reinstalled everything from scratch, beginning from db server, then redmine, code review plugin, restored database, added code review module to the project, tuned permissions for code reviewing. The result is still the same: there is no edit icon whatsoever anywhere in the repository browser. What is wrong?

Exactly same problem here. We are using Redmine 1.0.1.devel.4068 (MySQL) and we have no "redmine_repo_pygments" installed and i set "chmod 700 ../plugin_assets/ -R" and chwon www-data.
I also checked that ".../redmine/public/plugin_assets/redmine_code_review" exists and the content of "../redmine/vendor/plugins/redmine_code_review/assets" is in there.

I got the tab Code-Reviews but there is no (Diff) link behind the file in repo browser, but a button to compare two revisions where i het a line by line view of a file, but np pencil's.

Please help!

RE: Code Review Plugin 0.2.7 Released. - Added by Paul paul about 11 years ago

Running 0.3.1 with Redmine 1.0.1 stable and Postgres. Works fine.
When I add Pygments plugin, it crashes.
Tried Haru's fix but all I get is:


ActionView::TemplateError (uninitialized constant RepoPygmentsApplicationHelperPatch::InstanceMethods::CodeRay) on line #5 of vendor/plugins/redmine_repo_pygments/app/views/common/_file.rhtml:
2:   <table class="filecontent CodeRay">
3:     <tbody>
4:       <% line_num = 1 %>
5:       <% syntax_highlight(filename, to_utf8(content)).each_line do |line| %>
6:         <tr>
7:           <th class="line-num" id="L<%= line_num %>"><a href="#L<%= line_num %>"><%= line_num %></a></th>
8:           <td class="<%= @code_css %>"><pre><%= line %></pre></td>

    vendor/plugins/redmine_repo_pygments/app/views/common/_file.rhtml:5:in `_run_rhtml_vendor47plugins47redmine_repo_pygments47app47views47common47_file46rhtml_locals_content_file_filename_object'
    app/views/repositories/entry.rhtml:11:in `_run_rhtml_app47views47repositories47entry46rhtml'
    passenger (2.2.15) lib/phusion_passenger/rack/request_handler.rb:92:in `process_request'
    passenger (2.2.15) lib/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
    passenger (2.2.15) lib/phusion_passenger/railz/application_spawner.rb:441:in `start_request_handler'
    passenger (2.2.15) lib/phusion_passenger/railz/application_spawner.rb:381:in `handle_spawn_application'
    passenger (2.2.15) lib/phusion_passenger/utils.rb:252:in `safe_fork'
    passenger (2.2.15) lib/phusion_passenger/railz/application_spawner.rb:377:in `handle_spawn_application'
    passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:352:in `__send__'
    passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
    passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
    passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:163:in `start'
    passenger (2.2.15) lib/phusion_passenger/railz/application_spawner.rb:222:in `start'
    passenger (2.2.15) lib/phusion_passenger/spawn_manager.rb:253:in `spawn_rails_application'
    passenger (2.2.15) lib/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
    passenger (2.2.15) lib/phusion_passenger/spawn_manager.rb:247:in `spawn_rails_application'
    passenger (2.2.15) lib/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
    passenger (2.2.15) lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
    passenger (2.2.15) lib/phusion_passenger/spawn_manager.rb:246:in `spawn_rails_application'
    passenger (2.2.15) lib/phusion_passenger/spawn_manager.rb:145:in `spawn_application'
    passenger (2.2.15) lib/phusion_passenger/spawn_manager.rb:278:in `handle_spawn_application'
    passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:352:in `__send__'
    passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
    passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'

Rendering /usr/local/www/redmine/public/500.html (500 Internal Server Error)

I realize this might be not related to Haru's plugin but wondered if someone else encountered the same problem.

Thanks!

RE: Code Review Plugin 0.3.1 — cannot get it work - Added by Haruyuki Iida about 11 years ago

Terence Mill wrote:

I got the tab Code-Reviews but there is no (Diff) link behind the file in repo browser, but a button to compare two revisions where i het a line by line view of a file, but np pencil's.

Yes. The page which shows diff between two revisions has no pencil icon.
I mean when URL is like "/projects/XXX/repository/diff?rev=XXX&rev_to=XXX".

Pencil icon appears if URL has specific file path with revision.
ex)

  • /projects/codereview/repository/revisions/555/diff/trunk/your/file/path
  • /projects/codereview/repository/revisions/555/trunk/your/file/path

RE: Code Review Plugin 0.2.7 Released. - Added by Haruyuki Iida about 11 years ago

Paul paul wrote:

Running 0.3.1 with Redmine 1.0.1 stable and Postgres. Works fine.
When I add Pygments plugin, it crashes.

Is coderay-0.9.2 exists in vendor/plugins directory?
The error says that CodeRay not found in your system.

RE: Code Review Plugin 0.2.7 Released. - Added by Paul paul about 11 years ago

Yes, that directory is there. It contains lib/ and within it, README, coderay/ and coderay.rb

RE: Code Review Plugin 0.3.1 — cannot get it work - Added by Terence Mill about 11 years ago

Haru Iida wrote:

Terence Mill wrote:

I got the tab Code-Reviews but there is no (Diff) link behind the file in repo browser, but a button to compare two revisions where i het a line by line view of a file, but np pencil's.

Yes. The page which shows diff between two revisions has no pencil icon.
I mean when URL is like "/projects/XXX/repository/diff?rev=XXX&rev_to=XXX".

Pencil icon appears if URL has specific file path with revision.
ex)

  • /projects/codereview/repository/revisions/555/diff/trunk/your/file/path
  • /projects/codereview/repository/revisions/555/trunk/your/file/path
I clicked all an everyhwre, but can't get such URL. This are the urls i can produce.
  • /myproject/repository/revisions/4
  • /myproject/repository/revisions/4/entry/trunk/JiraImporter/src/jira_mapping.txt
  • /myproject/repository/revisions/4/changes/trunk/JiraImporter/src/xml_parser.pl
  • /myproject/repository/revisions/3/annotate/trunk/JiraImporter/.project

NONE OF THEM shows pencil!

Sorry, but please help me setp by setp to find that pencil.

RE: Code Review Plugin 0.3.1 — cannot get it work - Added by Chris Lajoie about 11 years ago

Terence Mill wrote:

Sorry, but please help me setp by setp to find that pencil.

First make sure you have everything set up correctly. Under Administration/Roles, make sure the role you are assigned to has all of the Code Review roles checked. Also make sure you have code review module enabled on the Modules tab of the project settings. To confirm it's working, you should have a Code Reviews tab to the right of Repository.

Now click the Repository tab, and click on a revision number (do not click the "View Differences" button).
For example in my project, under the Latest Revisions heading, my latest revision is 12406. I click that link in the first column to get a list of the files changed in the revision.

Here, find a file you want to review. I find it most useful to do code reviews on diffs rather than entire files, so what I typically do is click the (diff) link next to the file. However, even if you click the file link (and not the diff link) you should still see the pencil icons.

Hope this helps!
Chris

RE: Code Review Plugin 0.3.1 — cannot get it work - Added by Terence Mill about 11 years ago

Chris Lajoie wrote:

Terence Mill wrote:

Sorry, but please help me setp by setp to find that pencil.

First make sure you have everything set up correctly. Under Administration/Roles, make sure the role you are assigned to has all of the Code Review roles checked. Also make sure you have code review module enabled on the Modules tab of the project settings. To confirm it's working, you should have a Code Reviews tab to the right of Repository.

Now click the Repository tab, and click on a revision number (do not click the "View Differences" button).
For example in my project, under the Latest Revisions heading, my latest revision is 12406. I click that link in the first column to get a list of the files changed in the revision.

Here, find a file you want to review. I find it most useful to do code reviews on diffs rather than entire files, so what I typically do is click the (diff) link next to the file. However, even if you click the file link (and not the diff link) you should still see the pencil icons.

Hope this helps!
Chris

Ahh its working now .. i missed the right to set for code review in role setup. You can see review tab in project site, but cant see the pencil as admin. Btw. really coll Plugin, and works like a charm.
Good Job!

RE: Code Review Plugin 0.3.1 — cannot get it work - Added by Terence Mill about 11 years ago

Chris Lajoie wrote:

Terence Mill wrote:

Sorry, but please help me setp by setp to find that pencil.

First make sure you have everything set up correctly. Under Administration/Roles, make sure the role you are assigned to has all of the Code Review roles checked. Also make sure you have code review module enabled on the Modules tab of the project settings. To confirm it's working, you should have a Code Reviews tab to the right of Repository.

Now click the Repository tab, and click on a revision number (do not click the "View Differences" button).
For example in my project, under the Latest Revisions heading, my latest revision is 12406. I click that link in the first column to get a list of the files changed in the revision.

Here, find a file you want to review. I find it most useful to do code reviews on diffs rather than entire files, so what I typically do is click the (diff) link next to the file. However, even if you click the file link (and not the diff link) you should still see the pencil icons.

Hope this helps!
Chris

Ahh its working now .. i missed the right to set for code review in role setup. You can see review tab in project site, but cant see the pencil as admin. Btw. really cool Plugin, and works like a charm.
Good Job!

Working find on Redmine 1.0.3 - Added by Tom Kersten about 11 years ago

I have a (relatively) clean install of Redmine 1.0.3 (one other plugin) and was able to install this plugin without issues (svn checkout, rake db:migrate_plugins, restart app servers). I used the r562 from the svn repository (on google code).

Works pretty slick. Nice job, guys!

RE: Working fine on Redmine 1.0.3 - Added by Tom Kersten about 11 years ago

Tom Kersten wrote:

I have a (relatively) clean install of Redmine 1.0.3 (one other plugin) and was able to install this plugin without issues (svn checkout, rake db:migrate_plugins, restart app servers). I used the r562 from the svn repository (on google code).

Works pretty slick. Nice job, guys!

Comments on 0.3.1 with RM 1.0.3 - Added by Paul paul about 11 years ago

I had the following comments from one of our developers:
  • Reviewer doesn't see the entirety of the code in context. Can the plugin be changed to allow assignment of reviews not only based on a diff?
  • Each and every comment becomes an issue. That's a lot of issue traffic. Can comments be grouped?
  • If three different people ask me to review their code, there's no easy way to group a related bunch of requests other than search & sort.

Are any of these possible?
Thank you!

1 2 3 4 5 (51-75/103)