上周末(2011年7月16日),我们的mercurial包在ubuntu lucid上使用mercurial稳定的ppa自动更新到最新的1.9 mercurial二进制文件。
现在,通过SSH从存储库拉取不再起作用。显示以下错误:
remote: Traceback (most recent call last):
remote: File "/usr/share/mercurial-server/hg-ssh", line 86, in <module>
remote: dispatch.dispatch(['-R', repo, 'serve', '--stdio'])
remote: File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 31, in dispatch
remote: if req.ferr:
remote: AttributeError: 'list' object has no attribute 'ferr'
abort: no suitable response from remote hg!在mercurial 1.9 upgrade notes中有一个“有趣的”注释:
contrib/hg-ssh from older Mercurial releases will not be compatible with version 1.9, please update your copy.有人知道如何升级mercurial-server包(如果已经有版本的话)吗?或者我们需要升级其他东西?(新的python脚本?)
如果还没有必要的软件包的新版本,如何降级到之前的1.7.5 (ubuntu lucid)?
任何帮助都是非常感谢的,因为我们的开发过程真的因为这个事实而变慢了。:S
谢谢
发布于 2011-07-18 17:51:37
好的,通过编辑python脚本找到了一个(变通的)解决方案。
编辑脚本/usr/share/mercurial-server/hg-ssh,替换脚本末尾的行:
dispatch.dispatch(['-R', repo, 'serve', '--stdio'])使用这行代码:
dispatch.dispatch(dispatch.request(['-R', repo, 'serve', '--stdio']))同时替换:
dispatch.dispatch(['init', repo])使用这行代码:
dispatch.dispatch(dispatch.request(['init', repo]))这对我们来说很有效。
希望这能为其他人节省4个小时的谷歌搜索和学习python基础知识的时间。:S
发布于 2012-04-21 14:41:31
更新后的mercurial-server版本支持应用编程接口更改,但可能需要重新运行 refresh-auth脚本以进行升级。
https://stackoverflow.com/questions/6730735
复制相似问题