【问题标题】:hg+svn clone repository errorhg+svn 克隆存储库错误
【发布时间】:2012-03-25 10:29:52
【问题描述】:

我正在尝试在 windows 上克隆 svn 存储库,如下所述:

https://www.mercurial-scm.org/wiki/HgSubversion

这里:

https://www.mercurial-scm.org/wiki/WorkingWithSubversion

我通常使用 x64 2.6.6 python,但我也需要 32 位,所以我有 32 位 2.7,我已经将 swig python svn 绑定从

http://sourceforge.net/projects/win32svn/

问题是当我克隆 mercurial 时似乎使用没有绑定的 2.6.6,因此我猜这个错误:

** unknown exception encountered, please report by visiting
**  http://mercurial.selenic.com/wiki/BugTracker
** Python 2.6.6 (r266:84297, Aug 24 2010, 18:13:38) [MSC v.1500 64 bit (AMD64)]
** Mercurial Distributed SCM (version 2.1)
** Extensions loaded: hgsubversion
Traceback (most recent call last):
  File "hg", line 42, in <module>
  File "mercurial\dispatch.pyo", line 27, in run
  File "mercurial\dispatch.pyo", line 64, in dispatch
  File "mercurial\dispatch.pyo", line 87, in _runcatch
  File "mercurial\dispatch.pyo", line 683, in _dispatch
  File "mercurial\dispatch.pyo", line 465, in runcommand
  File "mercurial\dispatch.pyo", line 737, in _runcommand
  File "mercurial\dispatch.pyo", line 691, in checkargs
  File "mercurial\dispatch.pyo", line 680, in <lambda>
  File "mercurial\util.pyo", line 456, in check
  File "mercurial\extensions.pyo", line 139, in wrap
  File "mercurial\util.pyo", line 456, in check
  File "C:\Users\IG\Documents\hgsubv\hgsubversion\wrappers.py", line 495, in c
lone
    orig(ui, source, dest, **opts)
  File "mercurial\util.pyo", line 456, in check
  File "mercurial\commands.pyo", line 1157, in clone
  File "mercurial\extensions.pyo", line 184, in wrap
  File "C:\Users\IG\Documents\hgsubv\hgsubversion\wrappers.py", line 484, in h
gclonewrapper
    data['srcrepo'], data['dstrepo'] = orig(ui, *args, **opts)
  File "mercurial\hg.pyo", line 350, in clone
  File "mercurial\localrepo.pyo", line 2265, in clone
  File "C:\Users\IG\Documents\hgsubv\hgsubversion\svnrepo.py", line 70, in wra
pper
    return fn(self, *args, **opts)
  File "C:\Users\IG\Documents\hgsubv\hgsubversion\svnrepo.py", line 89, in pul
l
    return wrappers.pull(self, remote, heads, force)
  File "C:\Users\IG\Documents\hgsubv\hgsubversion\wrappers.py", line 353, in p
ull
    firstrun)
  File "C:\Users\IG\Documents\hgsubv\hgsubversion\replay.py", line 67, in conv
ert_rev
    svn.get_replay(r.revnum, editor, meta.revmap.oldest)
  File "C:\Users\IG\Documents\hgsubv\hgsubversion\svnwrap\svn_swig_wrapper.py"
, line 403, in get_replay
    self.init_ra_and_client()
  File "C:\Users\IG\Documents\hgsubv\hgsubversion\svnwrap\svn_swig_wrapper.py"
, line 226, in init_ra_and_client
    raise common.SubversionConnectionException(msg)
hgext_hgsubversion.svnwrap.common.SubversionConnectionException: Failed to open Subversion repository;

我在 ENV VARIABLES 中将 2.7 放在 2.6.6 之前,当进入 cmd 时,我编写 python 我将 2.7 视为我的默认 python dist。

我错过了什么?

谢谢

编辑:

我在内置 mercurial 的 64 位窗口中使用 tortoise hg,这可能是问题吗?

【问题讨论】:

    标签: python svn mercurial swig


    【解决方案1】:

    您忘记包含错误消息的最后一行“请尝试运行 'svn ls URL-of-repo' 以获取详细信息。”,但你完成了svn ls,确定吗?

    如果它是具有悠久历史的大型 repo,则不建议从头克隆到 HEAD。克隆一些修改并停止

    或阅读this topic 了解 subvertpy、subvertpy 绑定细节和 Win32 的 Subvertpy 二进制文件

    【讨论】:

    • 没试过svn ls,你说得对,有很多历史,但是atm我用visual svn demo拉出来,它包含svn命令行但它只是临时解决方案,谢谢,我会再调查一下