我正在尝试使用Mercurial作为Subversion的前端,并且非常感兴趣让所有分支等完整,以便我可以看到常见的更改等。
但是,我的所有subversion存储库都为mercurial创建了相当大的问题(遗憾的是,对于TortoiseHg 2.0,ppa似乎删除了较旧的版本......)。问题是多种多样的,并且对列出(或弄清楚)有太多烦恼。
如何跳过hg clone
或hg pull
抱怨的svn修订版?或者,在获得成功克隆之前,我是否必须以递归方式获得越来越少的修订版本?
另外,我尝试通过从svn导出补丁并将其应用到我的工作目录来解决这个问题。发生完全相同的问题(但至少现在我有一些东西要看......)
我遇到的问题(但不是专门讨论问题的主题......)
现有文件覆盖尝试:
由hg init
实现,设置svn网址和hg pull
pulling from svn+http://subversion/src/...
[r5061] StephenK: Updated properties
/home/stephenk/hgsubversion/hgsubversion/wrappers.py:337: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
ui.status('%s\n' % e.message)
This Subversion server is older than 1.4.0, and cannot satisfy replay requests.
In light of that, I'll fall back and do diffs, but it won't do as good a job. You should really upgrade your server.
[r5061] StephenK: Updated properties
file Synchronisation/stephenk.properties already exists
1 out of 1 hunks FAILED -- saving rejects to file Synchronisation/stephenk.properties.rej
一般Hunk问题:
由hg clone
[r82] Louis:
patching file src/main/.../Configuration.java
Hunk #1 FAILED at 10
Hunk #2 FAILED at 27
Hunk #3 FAILED at 81
3 out of 3 hunks FAILED -- saving rejects to file src/main/.../Configuration.java.rej
常见错误文字:
** unknown exception encountered, please report by visiting
** http://mercurial.selenic.com/wiki/BugTracker
** Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56) [GCC 4.4.3]
** Mercurial Distributed SCM (version 1.8)
** Extensions loaded: hgsubversion
Traceback (most recent call last):
File "/usr/bin/hg", line 38, in <module>
mercurial.dispatch.run()
File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 16, in run
sys.exit(dispatch(sys.argv[1:]))
File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 36, in dispatch
return _runcatch(u, args)
File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 58, in _runcatch
return _dispatch(ui, args)
File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 601, in _dispatch
cmdpats, cmdoptions)
File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 406, in runcommand
ret = _runcommand(ui, options, cmd, d)
File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 655, in _runcommand
return checkargs()
File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 609, in checkargs
return cmdfunc()
File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 598, in <lambda>
d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
File "/usr/lib/pymodules/python2.6/mercurial/util.py", line 433, in check
return func(*args, **kwargs)
File "/usr/lib/pymodules/python2.6/mercurial/extensions.py", line 133, in wrap
util.checksignature(origfn), *args, **kwargs)
File "/usr/lib/pymodules/python2.6/mercurial/util.py", line 433, in check
return func(*args, **kwargs)
File "/home/stephenk/hgsubversion/hgsubversion/wrappers.py", line 457, in clone
orig(ui, source, dest, **opts)
File "/usr/lib/pymodules/python2.6/mercurial/util.py", line 433, in check
return func(*args, **kwargs)
File "/usr/lib/pymodules/python2.6/mercurial/commands.py", line 825, in clone
branch=opts.get('branch'))
File "/usr/lib/pymodules/python2.6/mercurial/extensions.py", line 178, in wrap
return wrapper(origfn, *args, **kwargs)
File "/home/stephenk/hgsubversion/hgsubversion/wrappers.py", line 448, in hgclonewrapper
data['srcrepo'], data['dstrepo'] = orig(ui, origsource, dest, **opts)
File "/usr/lib/pymodules/python2.6/mercurial/hg.py", line 335, in clone
dest_repo.clone(src_repo, heads=revs, stream=stream)
File "/usr/lib/pymodules/python2.6/mercurial/localrepo.py", line 2014, in clone
return self.pull(remote, heads)
File "/home/stephenk/hgsubversion/hgsubversion/svnrepo.py", line 48, in wrapper
return fn(self, *args, **opts)
File "/home/stephenk/hgsubversion/hgsubversion/svnrepo.py", line 63, in pull
return wrappers.pull(self, remote, heads, force)
File "/home/stephenk/hgsubversion/hgsubversion/wrappers.py", line 325, in pull
firstrun)
File "/home/stephenk/hgsubversion/hgsubversion/stupid.py", line 592, in convert_rev
ui, svn, meta, b, branches[b], r, parentctx)
File "/home/stephenk/hgsubversion/hgsubversion/stupid.py", line 159, in diff_branchrev
{}, strip=0)
File "/usr/lib/pymodules/python2.6/mercurial/patch.py", line 1108, in applydiff
eolmode=eolmode)
File "/usr/lib/pymodules/python2.6/mercurial/patch.py", line 1135, in _applydiff
rejects += closefile()
File "/usr/lib/pymodules/python2.6/mercurial/patch.py", line 1122, in closefile
current_file.write_rej()
File "/usr/lib/pymodules/python2.6/mercurial/patch.py", line 519, in write_rej
fp = self.opener(fname, 'w')
TypeError: 'NoneType' object is not callable
我正在使用ubuntu,我真的希望有一个ppa来为我管理它,并且对这种互操作性感到沮丧。我想我可能要尝试一个hg + git + svn双桥或其他东西
答案 0 :(得分:0)
......今天它有效......也许我一下子从svn做了两次hg pull
次操作?我很确定会失败,但这是我现在可以继续做的最好的......
答案 1 :(得分:0)
考虑将服务器升级到1.4.x或更高版本 - 事情应该比...更好......
它看起来(来自堆栈跟踪)就像你在我们用来解决旧svn版本中缺少重放的diff +补丁代码中发现了一些错误但是如果没有测试就不可能知道问题是什么我们可以玩的回购。