Re: cvs2svn conversion directly to git ready for experimentation
From: Steffen Prohaska <hidden>
Date: 2016-06-15 22:43:25
Simon, On Aug 2, 2007, at 9:29 PM, Simon 'corecode' Schubert wrote:
Steffen Prohaska wrote:quoted
I remember that togit reported a broken pipe. My feeling was that git-fastimport aborted, which may be reason why tohg worked better. I didn't try to understand more details. I never read ruby code before and it was already a challenge for me to get everything up and running (rcs, rbtree).yah, that pretty much tells me it is shawn's bug :) but without more details, it is very hard to diagnose.
I tried again. Interestingly now togit works but tohg still fails. togit starts with reporting fatal: Not a valid object name as the first line. But besides that it seems to work fine. What concerns me a bit is that the last line togit reports is committing set 18100/18173 I'd expect it should report 18173/18173. The rest are git-fast-import statistics. BTW, togit creates much more complex branching patterns than cvs2svn does. The attached file branching.png displays a small view of a branching pattern that extends downwards over a couple of screens. I checked the cvs2svn history again. It doesn't contain anything of similar complexity.
tohg should tell you which rcs revs are the offenders. be sure to use a recent fromcvs however.
tohg fails (on the same repo that togit imported) with the
following error
Traceback (most recent call last):
File "./tohg.py", line 102, in <module>
destrepo.dispatch()
File "./tohg.py", line 98, in dispatch
func(*l[1:])
File "./tohg.py", line 78, in cmd_commit
extra = {'branch': branch})
File "/sw/lib/python2.5/site-packages/mercurial/localrepo.py",
line 736, in commit
mn = self.manifest.add(m1, tr, linkrev, c1[0], c2[0], (new,
remove))
File "/sw/lib/python2.5/site-packages/mercurial/manifest.py", line
191, in add
_("failed to remove %s from manifest") % f)
AssertionError: failed to remove X/Y.cpp from manifest
transaction abort!
rollback completed
./tohg.rb:200:in `readline': End of file reached while handling set
[core/X/Y.cpp,v:1.19,core/X/Z.cpp,v:1.22,core/X/Attic/W,v:1.12]
(EOFError)
from ./tohg.rb:200:in `_commit'
from ./tohg.rb:154:in `commit'
from ./fromcvs.rb:894:in `commit'
from ./fromcvs.rb:965:in `commit_sets'
from ./tohg.rb:228
The versions I used are listed below. I adjusted tohg a bit to use
python 2.5
installed by fink. I'm working on Mac OS X.
$ cd fromcvs
$ hg tip
changeset: 103:cccdab84e9e5
tag: tip
user: Simon 'corecode' Schubert [off-list ref]
date: Mon Jul 16 23:49:52 2007 +0200
summary: Add error handling on committing sets.
$ hg diff
diff -r cccdab84e9e5 tohg.rb--- a/tohg.rb Mon Jul 16 23:49:52 2007 +0200
+++ b/tohg.rb Fri Jul 20 17:06:30 2007 +0200@@ -60,7 +60,7 @@ class HGDestRepo @status = status @outs, @ins = \ - Open2.popen2('python', File.join(File.dirname($0), 'tohg.py'),
hgroot)
+ Open2.popen2('python2.5', File.join(File.dirname($0),
'tohg.py'), hgroot)
@last_date = Time.at(@ins.readline.strip.to_i)
@branches = {}
while l = @ins.readline do
$ cd rcsparse
$ hg tip
changeset: 37:e871e108f2e4
tag: tip
user: Simon 'corecode' Schubert [off-list ref]
date: Sun Feb 18 15:46:29 2007 +0100
summary: Return revision date in GMT, like RCS/CVS uses everywhere.
rbtree-0.2.0.tar.gz
ruby 1.8.2 (2004-12-25) [universal-darwin8.0]
$ cd git
$ git describe master
v1.5.3-rc3-120-g68d4229
$ hg --version
Mercurial Distributed SCM (version 0.9.3)
Copyright (C) 2005, 2006 Matt Mackall [off-list ref]
This is free software; see the source for copying conditions. There
is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
$ /sw/bin/python2.5 --version
Python 2.5.1
Hope this helps.
Steffen