【发布时间】:2014-11-10 11:17:23
【问题描述】:
我已经设置了 Mercurial 服务器和默认的 Mercurial Web 界面。我已将collapse 选项设置为true,以便在Web 界面中查看存储库时可以看到文件夹层次结构。我知道我可以为每个存储库设置name、description、contact 等,所有这些内容都将显示在 Web 界面中。是否可以对文件夹执行相同的操作?
【问题讨论】:
我已经设置了 Mercurial 服务器和默认的 Mercurial Web 界面。我已将collapse 选项设置为true,以便在Web 界面中查看存储库时可以看到文件夹层次结构。我知道我可以为每个存储库设置name、description、contact 等,所有这些内容都将显示在 Web 界面中。是否可以对文件夹执行相同的操作?
【问题讨论】:
在反复无常的资源中找到答案。
您可以在这里看到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 界面中打开此文件夹时,您将看到存储库概览而不是目录列表。
所以,如果不修改源,我就无法做我想做的事。
【讨论】: