linux - mercurial 1.9 和 ssh 的问题

标签 linux mercurial

上周末(2011 年 7 月 16 日),我们的 mercurial 软件包使用 ubuntu lucid 上的 mercurial-stable 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

谢谢

最佳答案

好的,通过编辑 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 个小时的 google 搜索和 python 基础知识学习时间。 :S

关于linux - mercurial 1.9 和 ssh 的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6730735/

相关文章:

linux - 使用 Gnuplot 时缺少终端 "png"

linux - Bash 脚本 - if block 中的 boolean 值?

git - 如何在 Git 中执行 "hg backout X"?

git - git 中的 Hg update -C Mercurial 命令等效命令

c - 如何使用 C 检测 Linux 中的挂起进程?

linux - Linux 上的 Blobfuse 与 Azure - 如何在 Azure 上创建 tmp-path

linux - 测试服务器构建的最佳方法是什么?

mercurial - Mercurial 中的 MQ 与分支

c++ - Linux exec 程序没有得到输出值

Git 类似于 Hg 的 Bigfiles 扩展?