【问题标题】:Can I create a cross-project source reference in redmine?我可以在 redmine 中创建跨项目源引用吗?
【发布时间】:2010-03-31 06:46:52
【问题描述】:

如果您有两个以某种方式连接的独立项目。如何引用另一个项目的源代码?

用于引用您自己项目的源代码:

source:some/file

但由于我想引用另一个项目中的代码,我的想法是我可以编写如下内容:

other_project:source:some/file

有人知道这是否可以通过某种方式实现吗?我已经阅读了http://www.redmine.org/wiki/redmine/RedmineTextFormatting#Redmine-links,但没有找到任何线索。

【问题讨论】:

    标签: redmine


    【解决方案1】:

    显然这是implemented in Redmine 1.2.0(2011-05-30 发布)。语法正是您在问题中建议的语法,other_project:source:some/file, other_project 是项目标识符。

    【讨论】:

      【解决方案2】:

      这可以通过多种方式实现——尽管这两种解决方案都不是特别简洁。

      1. 使用指向 other_project 源代码的外部 html 链接,其中 other-proj 是其他项目的标识符。

        "other project source":http://myserver:3000/projects/other-proj/repository/entry/file.txt
        
      2. 通过父目录定义源路径,因此从当前项目的源目录上升 3 个目录级别,然后向下导航回其他项目的存储库。请注意,源链接需要在双引号内才能工作。这种方法至少将源标签保留在链接的最前面。

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

      【讨论】:

      • 是的,这两种解决方案都不是特别整洁。
      【解决方案3】:

      Redmine Text Formatting 页面显示格式为:

      source:repo_identifier|some/file

      即便如此,所选答案适用于我的 Redmine 版本(1.4.2),但在以后的版本中可能已更改。在 OP 提出问题后,此链接格式已于 2012 年 8 月 27 日添加到该 wiki 页面。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2010-09-13
        • 1970-01-01
        • 2022-11-17
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多