我最近在我的服务器上升级了mercurial,现在我的hgweb.cgi脚本出现以下错误。当我谷歌为它,我只找到Windows机器的设置教程谈论模板,甚至他们没有指定从哪里获取模板。有人可以帮助我让我的服务器再次运行吗?
struct Global<'a> {
one: i32,
two: &'a i32
}
fn do_task<F, R>(global: &mut Global, task: F)
where F: for<'a> Fn(&'a mut Global) -> &'a R {
let result = task(global);
}
fn one<'a>(global: &'a mut Global) -> &'a i32 {
&global.one
}
fn two<'a>(global: &'a mut Global) -> &'a i32 {
global.two
}
fn main() {
let number = 2;
let mut global = Global {
one: 1,
two: &number
};
do_task(&mut global, one);
do_task(&mut global, two);
}
答案 0 :(得分:0)
经过大量搜索:
将以下内容添加到hgweb.config文件中:
[web]
templates = /usr/share/mercurial/templates