Mercurial 1.9 和 ssh 的问题

发布于 2024-11-24 16:11:43 字数 1086 浏览 2 评论 0原文

上周末(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 升级说明 有一个“有趣”的注释:

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)?

非常感谢任何帮助,因为我们的开发过程确实因此而减慢。 :

谢谢

Last weekend (16. July 2011) our mercurial packages auto-updated to the newest 1.9 mercurial binaries using the mercurial-stable ppa on a ubuntu lucid.

Now pulling from repository over SSH no longer works.
Following error is displayed:

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!

In the mercurial 1.9 upgrade notes there is an 'interesting' note:

contrib/hg-ssh from older Mercurial releases will not be compatible with version 1.9, please update your copy.

Has somebody an idea how to upgrade (if there is already a version) the package mercurial-server?
Or do we need to upgrade something else? (New python scripts?)

If there is no new version yet of the necessary packages, how to downgrade to the previous 1.7.5 (ubuntu lucid)?

Any help is really appreciated as our development processes are really slowed down by this fact. :S

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

一紙繁鸢 2024-12-01 16:11:43

好的,通过编辑 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

Ok, found a (workaround) solution by editing a python script.

Edit the script /usr/share/mercurial-server/hg-ssh
At the end of the script replace the line:

dispatch.dispatch(['-R', repo, 'serve', '--stdio'])

with the line:

dispatch.dispatch(dispatch.request(['-R', repo, 'serve', '--stdio']))

Replace also:

dispatch.dispatch(['init', repo])

with the line:

dispatch.dispatch(dispatch.request(['init', repo]))

This works for us.

Hopefully this saves to somebody else burning 4 hours of work with googleing and learning basics of python. :S

淤浪 2024-12-01 16:11:43

Mercurial-server 的最新版本已更新以支持 API 更改,但可能需要重新运行 refresh-auth 脚本才能升级安装。

More recent versions of mercurial-server are updated to support the API changes, but may require the refresh-auth script to be rerun for installations being upgraded.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文