Mercurial 使用 Python 2 而不是 Python 3 时因缺少属性而失败

Mercurial 使用 Python 2 而不是 Python 3 时因缺少属性而失败

我正在使用 mercurial 开发一个多用户系统。我最近一直没有使用这个系统,今天我想重新开始,但 mercurial 拒绝工作:

$ hg help
*** failed to import extension transplant from
mercurial_keyring =: [Errno 2] No such file or directory: '\nmercurial_keyring ='
** Unknown exception encountered with possibly-broken third-party extension hgflow
** which supports versions unknown of Mercurial.
** Please disable hgflow and try your action again.
** If that fixes the bug please report it to the extension author.
** Python 2.7.10 (default, May 26 2015, 04:16:29) [GCC 5.1.0]
** Mercurial Distributed SCM (version 3.4)
** Extensions loaded: color, largefiles, graphlog, hgk, strip, mq, rebase, record, shelve, hgflow, terse-status
Traceback (most recent call last):
  File "/usr/bin/hg", line 43, in <module>
    mercurial.dispatch.run()
  File "/usr/lib/python2.7/site-packages/mercurial/dispatch.py", line 29, in run
    sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255)
  File "/usr/lib/python2.7/site-packages/mercurial/dispatch.py", line 91, in dispatch
    ret = _runcatch(req)
  File "/usr/lib/python2.7/site-packages/mercurial/dispatch.py", line 160, in _runcatch
    return _dispatch(req)
  File "/usr/lib/python2.7/site-packages/mercurial/dispatch.py", line 746, in _dispatch
    extensions.loadall(lui)
  File "/usr/lib/python2.7/site-packages/mercurial/extensions.py", line 123, in loadall
    extsetup(ui)
  File "/home/UNISIEGEN/gk784/.hg/terse-status/terse-status.py", line 40, in extsetup
    '_poststatus', _poststatus)
  File "/usr/lib/python2.7/site-packages/mercurial/extensions.py", line 255, in wrapfunction
    origfn = getattr(container, funcname)
AttributeError: type object 'workingctx' has no attribute '_poststatus'

Mercurial 适用于所有其他用户。我的第一个观察是使用 Python 2.7 而不是默认的 Python 3.4:

$ python --version
Python 3.4.3

从全局 hgrc 中删除模块也无济于事。然后另一个模块发生错误:

$ hg parent
** Unknown exception encountered with possibly-broken third-party extension hgflow

相同的错误消息,相同的调用堆栈。

我的环境中没有任何可疑之处,没有加载任何模块,所以我现在有点困惑。

答案1

原来这是由于现在不兼容的扩展简洁状态

相关内容