私は Mercurial を Subversion のフロント エンドとして使用しようとしていますが、共通の変更などを確認できるように、すべてのブランチなどをそのままにしておくことに強い関心があります。
ただし、私のすべてのサブバージョン リポジトリは、mercurial にかなり大きな問題を引き起こします (残念ながら、TortoiseHg 2.0 で 1.8 を使用すると、ppa は古いリビジョンを削除したようです...)。問題はさまざまであり、列挙 (または把握) するにはあまりにも多くの煩わしさがあります。
hg clone
またはhg pull
不平を言うsvnリビジョンをスキップするにはどうすればよいですか? それとも、複製が成功するまで、再帰的に取得するリビジョンの数を減らしていく必要がありますか?
また、パッチを svn からエクスポートして作業ディレクトリに適用することで、この問題を回避しようとしました。まったく同じ問題が発生します(しかし、少なくとも今、私は何かを調べています...)
私が得ている問題(ただし、特に質問のトピックではありません...)
既存のファイルの上書き試行:
によって達成されhg init
、svn url を設定し、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
一般的なハンクの問題:
達成者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 のダブル ブリッジか何かを試す必要があるのではないかと考えています。