目前,我正在将 CVS 迁移到 Mercurial。
http://jstock.hg.sourceforge.net/hgweb/jstock/
我希望在 Mercurial 页面中获得联系方式和描述信息。
我查看 https://www.mercurial-scm.org/wiki/PublishingRepositories#Putting_useful_information_in_the_index_page
但是,对 C:\Projects\jstock\.hg\hgrc
的修改似乎根本没有任何效果。 push
不会更新 sourceforge 服务器中的任何内容。
那么,这是否意味着唯一的方法是远程访问sourceforge Mercurial服务器并手动修改hgrc文件?
我尝试通过 ssh 连接到远程计算机。
[yccheok@shell-22003 .hg]$ pwd
/home/scm_hg/j/js/jstock/jstock-cloud/.hg
[yccheok@shell-22003 .hg]$ ls -al
total 56
drwxrwsr-x 3 yccheok jstock 1024 Nov 30 15:29 .
drwxrwsr-x 3 yccheok jstock 80 Nov 30 15:13 ..
-rw-rw-r-- 1 yccheok jstock 57 Nov 30 15:13 00changelog.i
-rw-rw-r-- 1 yccheok jstock 93 Nov 30 15:29 branchheads.cache
-rw-rw-r-- 1 yccheok jstock 23 Nov 30 15:13 requires
drwxrwsr-x 3 yccheok jstock 1024 Nov 30 15:29 store
-rw-rw-r-- 1 yccheok jstock 317 Nov 30 15:29 tags.cache
-rw-rw-r-- 1 yccheok jstock 7 Nov 30 15:29 undo.branch
-rw-rw-r-- 1 yccheok jstock 0 Nov 30 15:29 undo.dirstate
[yccheok@shell-22003 .hg]$
但无法找到 hgrc
文件。
Currently, I am in the progress of migrating CVS to Mercurial.
http://jstock.hg.sourceforge.net/hgweb/jstock/
I would like to have contact and description information in the mercurial page.
I look at https://www.mercurial-scm.org/wiki/PublishingRepositories#Putting_useful_information_in_the_index_page
But, it seems that, modification on C:\Projects\jstock\.hg\hgrc
doesn't have any effect at all. push
will not update anything in sourceforge server.
So, does this mean the only way is to remote access to sourceforge mercurial server and modify the hgrc file manually?
I try to ssh to the remote machine.
[yccheok@shell-22003 .hg]$ pwd
/home/scm_hg/j/js/jstock/jstock-cloud/.hg
[yccheok@shell-22003 .hg]$ ls -al
total 56
drwxrwsr-x 3 yccheok jstock 1024 Nov 30 15:29 .
drwxrwsr-x 3 yccheok jstock 80 Nov 30 15:13 ..
-rw-rw-r-- 1 yccheok jstock 57 Nov 30 15:13 00changelog.i
-rw-rw-r-- 1 yccheok jstock 93 Nov 30 15:29 branchheads.cache
-rw-rw-r-- 1 yccheok jstock 23 Nov 30 15:13 requires
drwxrwsr-x 3 yccheok jstock 1024 Nov 30 15:29 store
-rw-rw-r-- 1 yccheok jstock 317 Nov 30 15:29 tags.cache
-rw-rw-r-- 1 yccheok jstock 7 Nov 30 15:29 undo.branch
-rw-rw-r-- 1 yccheok jstock 0 Nov 30 15:29 undo.dirstate
[yccheok@shell-22003 .hg]$
But not able to find hgrc
file.
发布评论
评论(2)
.hg/hgrc
文件包含本地设置,并且本身不是版本化文件。这些设置不会通过hgclone
、hgpush
或hgpull
命令从一个存储库传输到另一个存储库。如果要编辑 Source forge 存储库的
hgrc
文件,则必须使用 Sourceforge 的 交互式 shell 服务。The
.hg/hgrc
file contains local settings and is not itself a versioned file. These settings do not travel from one repository to the other byhg clone
,hg push
orhg pull
commands.If you want to edit the
hgrc
file of your source forge repository, you have to use Sourceforge's interactive shell service.我的猜测是,由于 信任规则。他们的网络服务器用户需要有一个信任块,表示他们信任您的 .hgrc 文件,这是一个风险,因为它允许您以他们的网络服务器用户身份执行代码。
如果有办法做到这一点,解决方案将来自具有强大的sourceforge-fu,而不是mercurial-fu的人。
My guess would be that the sourceforge server doesn't consider your repo's
.hg/hgrc
file due to trust rules. Their webserver user would need to have a trust block saying they trust .hgrc files from you, which is a risk as it allows you to have code executed as their webserver user.If there's a way to do this the solution is going to come from somewith with strong sourceforge-fu, not mercurial-fu.