I'm trying to convert our company's CVS to Mercurial but so far without success. Remote file history should be retained.
I tried the conversion tools described on RepositoryConversion - Mercurial
Convert extension
e:\Hg>hg convert -s CVS H:\Cvs
assuming destination cvs-hg
initializing destination cvs-hg repository
abort: CVS: invalid source repository type
What's going on!?
cvs2hg
Looks very promising, but errors out at the last moment.
python cvs2hg -v --encoding=UTF8 --hgrepos=e:/Hg h:/Cvs
Result after 10 minutes and 9 miles of text:
----- pass 14 (SortSymbolOpeningsClosingsPass) -----
Sorting symbolic name source revisions...
Done
Time for pass14 (SortSymbolOpeningsClosingsPass): 0.150 seconds.
Deleting cvs2svn-tmp\statistics-13.pck
Deleting cvs2svn-tmp\symbolic-names.txt
----- pass 15 (IndexSymbolsPass) -----
Determining offsets for all symbolic names...
VERSION_0_22
VERSION_0_18
VERSION_0_11
VERSION_0_9
VERSION_0_5
VERSION_0_1
Done.
Time for pass15 (IndexSymbolsPass): 0.130 seconds.
Deleting cvs2svn-tmp\statistics-14.pck
----- pass 16 (OutputPass) -----
Traceback (most recent call last):
File "cvs2hg", line 91, in <module>
hg_main(os.path.basename(sys.argv[0]), sys.argv[1:])
File "c:\Portable progs\cvs2svn-19b322d42b1f\cvs2svn_lib\main.py", line 135, in hg_main
main(progname, run_options, pass_manager)
File "c:\Portable progs\cvs2svn-19b322d42b1f\cvs2svn_lib\main.py", line 96, in main
pass_manager.run(run_options)
File "c:\Portable progs\cvs2svn-19b322d42b1f\cvs2svn_lib\pass_manager.py", line 181, in run
the_pass.run(run_options, stats_keeper)
File "c:\Portable progs\cvs2svn-19b322d42b1f\cvs2svn_lib\passes.py", line 1771, in run
svn_commit.output(Ctx().output_option)
File "c:\Portable progs\cvs2svn-19b322d42b1f\cvs2svn_lib\svn_commit.py", line 238, in output
output_option.process_primary_commit(self)
File "c:\Portable progs\cvs2svn-19b322d42b1f\cvs2svn_lib\hg_output_option.py", line 291, in process_primary_commit
svn_commit, [parent1, parent2], filenames, getfilectx, lod)
File "c:\Portable progs\cvs2svn-19b322d42b1f\cvs2svn_lib\hg_output_option.py", line 715, in _commit_primary
return self._commit(svn_commit, parents, filenames, getfilectx, lod)
File "c:\Portable progs\cvs2svn-19b322d42b1f\cvs2svn_lib\hg_output_option.py", line 733, in _commit
return self._commit_memctx(mctx)
File "c:\Portable progs\cvs2svn-19b322d42b1f\cvs2svn_lib\hg_output_option.py", line 739, in _commit_memctx
node = self.repo.commitctx(mctx)
File "mercurial\localrepo.pyo", line 63, in wrapper
File "mercurial\localrepo.pyo", line 1399, in commitctx
File "mercurial\localrepo.pyo", line 1193, in _filecommit
File "mercurial\filelog.pyo", line 76, in cmp
AttributeError: 'bool' object has no attribute 'startswith'
Tailor, fromcvs
Initially blocked by link rot, but after Googling a lot, turn out to be Linux-only tools (?). I do have cygwin but I never had any good experiences compiling source distributions.
hg-cvs-import
Link rot too, and can't find anything. Moreover about the last three tools, I read on Would you migrate from cvs to svn or directly to git or hg?: "The Tailor extension, hg-cvs-import, fromcvs seems to be old code and aren't maintained any more."
I also tried the trick on Convert cvs to mercurial, even though it probably only retains local file history, but got the same result as in my first try.
Any other tools I somehow missed? Maybe a user-friendly application for Windows?