Project

General

Profile

Actions

Defect #7325

closed

When browsing a file in a Mercurial repository Redmine 500's

Added by Wesly Grefrath about 13 years ago. Updated about 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Toshi MARUYAMA
Category:
SCM
Target version:
-
Start date:
2011-01-13
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

Description

When clicked on a file in the repository viewer (Mercurial SCM) to take a look at it, Redmin gives a 500.

The error log shows this at that moment:

Unknown option: --
usage: python [option] ... [-c cmd | -m mod | file | -] [arg] ...
Try `python -h' for more information.


Related issues

Related to Redmine - Defect #6683: Error 500 when viewing one of the repositoryClosed2010-10-15

Actions
Actions #1

Updated by Wesly Grefrath about 13 years ago

Some extra info:

  • Database: PostgreSQL 8.3
  • Ruby 1.8.7 (x86_64)
  • Rails 2.3.5
  • SCM version: Mercurial 1.4.3
Actions #2

Updated by Toshi MARUYAMA about 13 years ago

  • Assignee set to Toshi MARUYAMA
Actions #3

Updated by Toshi MARUYAMA about 13 years ago

What OS do you use in Redmine Server?

Actions #4

Updated by Wesly Grefrath about 13 years ago

CentOS 5.4

Actions #5

Updated by Toshi MARUYAMA about 13 years ago

Is your Mercurial /usr/bin/hg?

Actions #6

Updated by Wesly Grefrath about 13 years ago

No. It's a symlink to a different location. We need Python 2.6 so we compiled our own and hg is installed with 2.6

Actions #7

Updated by Toshi MARUYAMA about 13 years ago

  • Priority changed from High to Normal

Could you set PATH to "hg" path or edit absolute path at source:/tags/1.1.0/lib/redmine/scm/adapters/mercurial_adapter.rb#L27 ?

Actions #8

Updated by Wesly Grefrath about 13 years ago

I set the absolute path, i.e.:

HG_BIN = "/usr/xtreme/bin/hg"

Restarted httpd but still same error

Actions #9

Updated by Toshi MARUYAMA about 13 years ago

Does "diff" and "annotate" on Redmine work fine?

Actions #10

Updated by Wesly Grefrath about 13 years ago

"diff" works, "annotate" doesn't (annotate gives the exact same error in the log)

Actions #11

Updated by Toshi MARUYAMA about 13 years ago

I don't know the reason that "diff" works and "cat" and "annotate" do not work.
I can't reproduce on my Fedora 13 and Mercurial 1.7.2.

If possible, could you run unit test on your test environment.
source:trunk/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb

Actions #12

Updated by Wesly Grefrath about 13 years ago

How do I create the Mercurial test repository?


ruby test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb 
/xtreme/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010.  Use #requirement
Mercurial test repository NOT FOUND. Skipping unit tests !!!
Loaded suite test/unit/lib/redmine/scm/adapters/mercurial_adapter_test
Started
..
Finished in 0.012988 seconds.

2 tests, 1 assertions, 0 failures, 0 errors

Actions #13

Updated by Toshi MARUYAMA about 13 years ago

$ rake test:scm:setup:mercurial

Actions #14

Updated by Wesly Grefrath about 13 years ago

ruby test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb 
/xtreme/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010.  Use #requirement
Loaded suite test/unit/lib/redmine/scm/adapters/mercurial_adapter_test
Started
.abort: requirement 'dotencode' not supported!
abort: requirement 'dotencode' not supported!
abort: requirement 'dotencode' not supported!
.abort: requirement 'dotencode' not supported!
abort: requirement 'dotencode' not supported!
abort: requirement 'dotencode' not supported!
.abort: requirement 'dotencode' not supported!
abort: requirement 'dotencode' not supported!
Eabort: requirement 'dotencode' not supported!
abort: requirement 'dotencode' not supported!
Fabort: requirement 'dotencode' not supported!
abort: requirement 'dotencode' not supported!
abort: requirement 'dotencode' not supported!
abort: requirement 'dotencode' not supported!
Eabort: requirement 'dotencode' not supported!
.abort: requirement 'dotencode' not supported!
.
Finished in 1.144645 seconds.

  1) Error:
test_annotate(MercurialAdapterTest):
NoMethodError: undefined method `lines' for nil:NilClass
    test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb:78:in `test_annotate'

  2) Failure:
test_cat(MercurialAdapterTest)
    [test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb:69:in `test_cat'
     test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb:67:in `each'
     test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb:67:in `test_cat']:
<nil> is not true.

  3) Error:
test_diff(MercurialAdapterTest):
NoMethodError: You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.size
    test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb:50:in `test_diff'
    test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb:48:in `each'
    test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb:48:in `test_diff'

8 tests, 33 assertions, 1 failures, 2 errors
Actions #15

Updated by Toshi MARUYAMA about 13 years ago

Sorry!!

Could you clone 1.1 and trunk from following link?

https://bitbucket.org/redmine/redmine

Actions #16

Updated by Wesly Grefrath about 13 years ago

Ok. tip cloned and rev 336724d7e8fa (1.1.0 I think)

Actions #17

Updated by Wesly Grefrath about 13 years ago

  • Status changed from New to Resolved

I've looked at the installed plugins, seems redmine_repo_pygments was installed. I removed that and now it works! Darn plugins. Thanks for your help!

Actions #18

Updated by Toshi MARUYAMA about 13 years ago

This repository has two named branches.

$ hg branches
1.1-stable                  4150:bb9aa5eef301
default                     4148:bfcbab34267b

'dotencode' is above Mercurial 1.7 repository format.

Please delete tmp/test/mercurial_repository/ and re-run "rake test:scm:setup:mercurial".

Actions #19

Updated by Toshi MARUYAMA about 13 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF