CVS migration help

Thomas Manson dev.mansonthomas at
Tue Oct 7 16:03:08 BST 2008

Hi Michael,

  I've checkout the trunk version (the version on ubuntu hardy heron is
quite old : 2.0.1)
  succeed in cvs2svn conversion,

 unfortunately it crashes in the same way that bzr cvsps-import does :

thomas at home:~/temp/bzr$ cat ../cvs2svn-tmp/git-blob.dat
../cvs2svn-tmp/git-dump.dat |  bzr fast-import -
bzr: ERROR: exceptions.UnicodeDecodeError: 'utf8' codec can't decode bytes
in position 43-45: invalid data
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/", line 834, in
    return run_bzr(argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/", line 790, in
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/", line 492, in
  File "/home/thomas/.bazaar/plugins/fastimport/", line 199, in
    params, verbose)
  File "/home/thomas/.bazaar/plugins/fastimport/", line 77, in
    return proc.process(p.iter_commands)
  File "/home/thomas/.bazaar/plugins/fastimport/", line 83, in
line 317, in _process
    processor.ImportProcessor._process(self, command_iter)
  File "/home/thomas/.bazaar/plugins/fastimport/", line 105, in
    handler(self, cmd)
line 486, in commit_handler
  File "/home/thomas/.bazaar/plugins/fastimport/", line 164, in
    for fc in self.command.file_iter():
  File "/home/thomas/.bazaar/plugins/fastimport/", line 312, in
    yield self._parse_file_modify(line[2:])
  File "/home/thomas/.bazaar/plugins/fastimport/", line 365, in
    path = self._path(params[2])
  File "/home/thomas/.bazaar/plugins/fastimport/", line 493, in
    return s.decode('utf_8')
  File "/usr/lib/python2.5/encodings/", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 43-45:
invalid data
bzr 1.3.1 on python (linux2)
arguments: ['/usr/bin/bzr', 'fast-import', '-']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
/usr/lib/python2.5/site-packages/bzrlib/plugins/bzrtools [1.3.0]
  cvsps_import         /home/thomas/.bazaar/plugins/cvsps_import [unknown]
  fastimport           /home/thomas/.bazaar/plugins/fastimport [unknown]
/usr/lib/python2.5/site-packages/bzrlib/plugins/launchpad [unknown]
*** Bazaar has encountered an internal error.
    Please report a bug at
    including this traceback, and a description of what you
    were doing when the error occurred.

I don't think it's related to cvs2svn or cvsps as it fails in both cases.
It should be a bzr bug.

I've successfully converted my project to git repository format with these
set of command :

export CVSROOT=/home/thomas/temp/cvs2git/cvs/files

git cvsimport -C /home/thomas/temp/cvs2gitOutput/crf-irp           crf-irp
git cvsimport -C /home/thomas/temp/cvs2gitOutput/crf-irp-model
git cvsimport -C /home/thomas/temp/cvs2gitOutput/crf-irp-monitor
git cvsimport -C /home/thomas/temp/cvs2gitOutput/crf-irp-portail
git cvsimport -C /home/thomas/temp/cvs2gitOutput/crf-irp-utilities

Is it possible to convert the git version of my sources to bzr ? maybe it
would be successfull.


On Tue, Oct 7, 2008 at 12:41, Michael Haggerty <mhagger at> wrote:

> Jelmer Vernooij wrote:
> > Am Dienstag, den 07.10.2008, 00:01 +0200 schrieb Thomas Manson:
> >> I've look to it... but didn't tryed yet...
> >>
> >> It really misses straightforward howto (for all tools except bzr
> >> cvsimport)
> > cvsps-import should be the best solution here, we should just fixing
> > that imho. What's blocking you from using it?
> No conversion tool that is based on cvsps will be able to do a truly
> reliable job of migrating from CVS.  cvsps, which was written for
> another purpose, simply is not robust enough and does not emit enough
> information for a complete conversion.  I gave many concrete examples of
> its shortcomings on the Mercurial mailing list [1].
> Deducing a project's history from CVS's incomplete records is a very
> tricky thing; cvs2svn's feature list [2] will give you an idea of the
> kinds of things an industrial-strength converter needs to handle.
> cvs2svn deduces the CVS changesets itself, using a much more robust
> algorithm than that used by cvsps.  (The main disadvantage of cvs2svn is
> that it can only be used for one-time conversions, not for tracking a
> live CVS repository incrementally.)
> cvs2svn/cvs2git can create output in git-fast-import format [3], which
> should also be readable by the bzr fast-import tool.  It hasn't gotten
> much testing in "cvs2bzr" mode, but given that 90% of the job is
> inferring CVS's history, it should not be too much work to fix any
> problems in the "2bzr" part.  Therefore, any feedback would be much
> appreciated.
> (By the way, if you want to use cvs2svn to convert to bzr, I suggest
> that you use the trunk version of cvs2svn, which has several
> improvements compared to release 2.1.1.)
> Michael
> [1]
> [2]
> [3]
-------------- next part --------------
An HTML attachment was scrubbed...
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cvs2svn-example.options
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cvs2svn-git.options

More information about the bazaar mailing list