Project

General

Profile

Actions

Defect #14405

closed

Alternate repo commit: link wrong when automatically added from a commit message

Added by Olivier Mehani almost 11 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
SCM
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Duplicate
Affected version:

Description

When adding some markup, in a commit message, containing an issue number, Redmine updates this issue with a link to the commit.

However, when this commit shows up in a repo which is not the main one for that project, the commit: link is not formatted properly, and reads REPONAME|commit:SHA instead of commit:REPONAME|SHA

An example can be found at [0]

[0] http://oml.mytestbed.net/issues/1156#note-19


Files

14405.patch (623 Bytes) 14405.patch Christoph Dwertmann, 2013-08-22 11:06

Related issues

Is duplicate of Redmine - Defect #13544: Commit reference: autogenerated issue note has wrong commit link syntax in multi-repo or cross-project contextClosedJean-Philippe Lang

Actions
Actions #1

Updated by Olivier Mehani almost 11 years ago

We also have a ticket of our own to track this issue [0].

[0] http://oml.mytestbed.net/issues/1352

Actions #2

Updated by Christoph Dwertmann over 10 years ago

Patch: see below

Actions #3

Updated by Olivier Mehani over 10 years ago

Looking at how Redmine formats svn links (PROJECT:REPONAME|rREV), I am starting to think that the commit link-generation is good, but the parsing is not.

The link generation creates something of the forrm PROJECT:REPONAME|commit:SHA, while the parsing expects PROJECT:commit:REPONAME|SHA. Trying to map SVN URLs to Git urls, commit: as the equivalent of r, which I call MARKER_, and ID as an SCM-independent commit ID, this gives the following:

  • SVN: PROJECT:REPONAME|MARKER_ID
  • Git (generated): PROJECT:REPONAME|MARKER_ID
  • Git (parsing): PROJECT:MARKER_REPONAME|ID

The SVN and Git (generated) schemas perfectly match, but are at odds with Git (parsing).

I'd say the problem is therefore in the parsing code, rather than the code generator.

Actions #5

Updated by Toshi MARUYAMA over 10 years ago

  • Category set to SCM
Actions #6

Updated by Markus Andree over 10 years ago

I can confirm this bug. I have the same problem with git.
Working links are as expected:

  • PROJECT:commit:REPONAME|COMMITID
  • commit:REPONAME|COMMITID
  • commit:COMMITID - for default repo

But automatic generated links for non default repo is:

REPONAME|commit:COMMITID

The patch looks good for me, I'll test that

Actions #7

Updated by Petr Bela about 10 years ago

Same problem, the patch seems to work fine.

Actions #8

Updated by Toshi MARUYAMA about 10 years ago

  • Status changed from New to Closed
  • Resolution set to Duplicate

Duplicate with #13544.

Actions #9

Updated by Toshi MARUYAMA about 10 years ago

  • Is duplicate of Defect #13544: Commit reference: autogenerated issue note has wrong commit link syntax in multi-repo or cross-project context added
Actions

Also available in: Atom PDF