【问题标题】:DeprecationWarning when pushing to Mercurial repo推送到 Mercurial 回购时的弃用警告
【发布时间】:2010-06-06 19:24:17
【问题描述】:

我正在尝试使用 apache 提供一个 merurial 存储库,当我尝试推送到存储库时,我在 apache error.log 中看到了这一点。在客户端,我收到 500 错误。

我怎样才能让它消失????

[Sun Jun 06 14:43:25 2010] [error] [client 192.168.1.8] /var/lib/python-support/python2.6/mercurial/hgweb/common.py:24: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
[Sun Jun 06 14:43:25 2010] [error] [client 192.168.1.8]   self.message = message
[Sun Jun 06 14:43:25 2010] [error] [client 192.168.1.8] /var/lib/python-support/python2.6/mercurial/hgweb/hgweb_mod.py:104: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
[Sun Jun 06 14:43:25 2010] [error] [client 192.168.1.8]   if not inst.message:
[Sun Jun 06 14:43:25 2010] [error] [client 192.168.1.8] /var/lib/python-support/python2.6/mercurial/hgweb/hgweb_mod.py:106: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
[Sun Jun 06 14:43:25 2010] [error] [client 192.168.1.8]   return '0\\n%s\\n' % inst.message,

【问题讨论】:

    标签: python apache mercurial


    【解决方案1】:

    弃用警告是一条红鲱鱼。它只是让您知道服务器代码以最终不受支持的方式访问了 python 异常。你真正想知道的是首先引发了什么异常。 (是否有错误消息与 500 错误一起出现?)

    【讨论】:

    • 不,这就是我在控制台中看到的全部内容:推送到 hg.corp.localproject.com/hgwebdir.cgi/localproject 搜索更改中止:HTTP 错误 500:内部服务器错误
    • 在弃用警告之后服务器日志中没有其他内容?看起来它正试图返回一个错误代码和消息,我本来希望它会出现在服务器输出中(因此也会出现在客户端输出中)。在这种情况下,我建议通过使用wireshark 嗅探服务器响应或临时编辑hgweb_mod.py 第106 行并在return 语句之前插入raise inst # 来发现异常消息(并在再次尝试时查看服务器日志)。
    • 如果所有其他方法都失败了,Mercurial 邮件列表中的某个人可能之前已经看到过这个问题。 selenic.com/mailman/listinfo/mercurial
    • 所以,这似乎是一个权限问题。我通过在 apache 所在的同一台机器上克隆 repo 并尝试推送到那里发现了这一点。看起来弃用警告实际上阻止了错误的显示。我希望他们能尽快解决这个问题。谢谢森林!
    • 您可以在 hgweb.config 中添加:[ui] debug=true,这将向 Apache 日志输出错误。
    猜你喜欢
    • 2020-01-06
    • 2016-03-11
    • 1970-01-01
    • 1970-01-01
    • 2011-03-03
    • 1970-01-01
    • 2021-03-05
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多