hgsubversion 找不到 python 绑定

hgsubversion 找不到 python 绑定

我昨天升级到了 11.10,从那时起 mercurial 的 hgsubversion 扩展就不再找到 python 绑定。

abort: no compatible bindings available:

Subversion 1.5.0 or later required, but no bindings were found
Subvertpy 0.7.4 or later required, but not found

Please install either Subvertpy or the Subversion Python SWIG bindings!

但是,这两个包目前都已安装(python-subversion 的版本为 1.6.12dfsg-4ubuntu5,python-subvertpy 的版本为 0.8.3-1)。

最初我使用的是从他们的 mercurial 存储库中提取的 hgsubversion,我必须在 mercurial 更新后对其进行更新,所以我现在使用的是修订版 836(10 月 12 日)。我看到存储库中现在有一个用于 hgsubversion 的包(不知道它是什么时候添加的),我也尝试了该版本,但无济于事。

到目前为止,以下是我尝试修复问题或帮助诊断的方法:

  1. 我重新安装了 subversion、mercurial、python 和两个绑定包。
  2. 我注意到我有 python 2.6 和 python 2.7,所以我删除了 python 2.6。
  3. 通过 HGSUBVERSION_BINDINGS="Subvertpy" 强制使用 Subvertpy:abort: Subvertpy 0.7.4 or later required, but not found!
  4. 通过 HGSUBVEERSION_BINDINGS="SWIG" 强制使用 SWIG 绑定:abort: Subversion 1.5.0 or later required, but no bindings were found!
  5. 尝试交替使用 Ubuntu 软件包版本的 hgsubversion(1.2.1-2.1)和从 hgsbuversion 存储库中提取的最新版本。

有人知道为什么会发生这种情况以及我应该怎么做才能解决它?

谢谢。

编辑:忘记了一些版本信息

python --version
Python 2.7.2+

软件包版本:2.7.2-5ubuntu1

hg version
Mercurial Distributed SCM (version 1.9.1)

软件包版本:1.9.1-1ubuntu0.1

答案1

在 HgSubversion wiki 上你可以阅读:

安装 hgsubversion 最简单的方法是克隆 hgsubversion 存储库,然后配置 Mercurial 来使用它。 建议克隆该提示,因为它比 2011 年 3 月的最新标签 1.2.1 稳定得多。

克隆存储库:

$ hg clone http://bitbucket.org/durin42/hgsubversion/ hgsubversion

所有测试通过:

$ nosetests
Ran 493 tests in 1400.680s

OK  

检查 HgSubversion 是否已安装并正确激活:

$ hg version --svn
Mercurial Distributed SCM (version 1.9.1)
(see http://mercurial.selenic.com for more information)

Copyright (C) 2005-2011 Matt Mackall and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

hgsubversion: 3292ff0380f3
Subversion: 1.6.12
bindings: Subvertpy 0.8.3

答案2

终于找到了原因:它来自我的 hgrc 中定义 hgview 扩展使用的行。

升级后,我的旧hgview=激活线路失败(找不到扩展),我hgext.hgview=/usr/share/pyshared/hgext/hgview.py找到它后就将其替换了。

由于之后日志中不再出现与 hgview 相关的错误,所以我没有多想。然而,这正是我的 hgsubversion 找不到绑定的原因,尽管我仍然不知道原因。

因此,删除我的文件里的那一行.hgrc就解决了问题。

相关内容