Project

General

Profile

Actions

Defect #12979

closed

Wiki link syntax commit:repo_a:abcd doesn't work

Added by Danil Tashkinov almost 12 years ago. Updated almost 12 years ago.

Status:
Closed
Priority:
Normal
Category:
Text formatting
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

The wiki syntax commit:repo_a used to link hash-named changesets doesn't work if repo identifier has underscore symbol.

Maybe in this code https://github.com/redmine/redmine/blob/master/app/helpers/application_helper.rb#L751 used wrong regular expression.

          when 'commit', 'source', 'export'
            if project
              repository = nil
              if name =~ %r{^(([a-z0-9\-]+)\|)(.+)$}
                repo_prefix, repo_identifier, name = $1, $2, $3
                repository = project.repositories.detect {|repo| repo.identifier == repo_identifier}
              else
                repository = project.repository
              end

Files

REDMINE_LINK_TO_COMMIT.diff (636 Bytes) REDMINE_LINK_TO_COMMIT.diff Danil Tashkinov, 2013-01-25 10:09

Related issues

Has duplicate Redmine - Defect #13005: Can't link to changeset or source in repository that contains underscoresClosed

Actions
Actions

Also available in: Atom PDF