【问题标题】:Mercurial web interface readable folder namesMercurial Web 界面可读文件夹名称
【发布时间】:2014-11-10 11:17:23
【问题描述】:

我已经设置了 Mercurial 服务器和默认的 Mercurial Web 界面。我已将collapse 选项设置为true,以便在Web 界面中查看存储库时可以看到文件夹层次结构。我知道我可以为每个存储库设置name、description、contact 等,所有这些内容都将显示在 Web 界面中。是否可以对文件夹执行相同的操作?

【问题讨论】:

    标签: mercurial hgweb


    【解决方案1】:

    在反复无常的资源中找到答案。

    您可以在这里看到contact 和description 字段对于目录始终为空:

    # add '/' to the name to make it obvious that
    # the entry is a directory, not a regular repository
    row = {'contact': "",
           'contact_sort': "",
           'name': name + '/',
           'name_sort': name,
           'url': url,
           'description': "",
           'description_sort': "",
           'lastchange': d,
           'lastchange_sort': d[1]-d[0],
           'archives': [],
           'isdirectory': True}
    
    seendirs.add(name)
    yield row
    

    当您尝试作弊并自己创建空的.hg 文件夹时,mercurial 会将该文件夹视为一个 mercurial 存储库,当您尝试在 Web 界面中打开此文件夹时,您将看到存储库概览而不是目录列表。

    所以,如果不修改源,我就无法做我想做的事。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-04-06
      • 1970-01-01
      • 2011-03-24
      • 2020-02-23
      • 2019-04-26
      • 2016-11-02
      • 2020-05-03
      相关资源
      最近更新 更多