Can I create a cross-project source reference in redmine?

走远了吗. 提交于 2019-12-10 13:36:02

问题


If you have two separate projects that is somehow connected. How can one make a reference to the source of the other project?

For referencing the source of your own project you use:

source:some/file

But since I want to refer to code in another project my thought was that I could write something like:

other_project:source:some/file

Anyone that knows if this is possible in some way? I have read http://www.redmine.org/wiki/redmine/RedmineTextFormatting#Redmine-links but found no clues there.


回答1:


Apparently this was implemented in Redmine 1.2.0 (released 2011-05-30). The syntax is exactly the one you suggested in the question, other_project:source:some/file, other_project being the project identifier.




回答2:


It is possible in a couple of ways - although neither solution is particularly neat.

  1. use an external html link to the other_project source code, where other-proj is the identifier for the other project.

    "other project source":http://myserver:3000/projects/other-proj/repository/entry/file.txt
    
  2. define the source path via the parent directories, so from the source directory of your current project go up 3 directory levels before navigating back down to the repository of your other project. Note the source link needs to be inside double quotes to work. This method at least keeps the source tag at the front of the link.

    source:"../../../other-proj/repository/entry/file.txt"
    



回答3:


The Redmine Text Formatting page says the format is:

source:repo_identifier|some/file

Even so, the selected answer works for my version of Redmine (1.4.2), but it may have been changed in later versions. This link format was added to that wiki page on 2012-08-27, after OP asked their question.



来源:https://stackoverflow.com/questions/2550960/can-i-create-a-cross-project-source-reference-in-redmine

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!