converting CVS repo to bzr
Alexander Belchenko
bialix at ukr.net
Mon Oct 26 10:11:20 GMT 2009
Ian Clatworthy пишет:
> Alexander,
>
> Thanks for the testing and feedback. At a minimum, it sounds like we
> need to provide much better documentation. Maybe we need some code
> changes as well to try and detect that the cvs.exe is one that works.
>
> I've copied Michael as he's the maintainer of cvs2svn. What changes do
> you suggest we make in that layer? What changes are needed above cvs2svn?
>
> Michael,
>
> Here's the full thread:
> https://lists.ubuntu.com/archives/bazaar/2009q4/063627.html
Ian, see below copy of the mail I've sent to cvs2bzr user mailing list about my experience. This
mail is not appear yet, perhaps it waiting in moderation queue.
Maybe you can use it for your manual.
-------- Исходное сообщение --------
Тема: Feedback on using cvs2bzr
Дата: Sun, 25 Oct 2009 17:06:55 +0200
От: Alexander Belchenko <bialix at ukr.net>
Группы новостей: gmane.comp.version-control.subversion.cvs2svn.user
Hi,
I've just successfully converted CVS repo hosted on sf.net to Bazaar
format and I'd like to provide some feedback about this process.
In short: instructions on http://cvs2svn.tigris.org/cvs2bzr.html is good
enough but I've encountered several problems somewhat related to
Windows, TortoiseCVS and bzr fastimport plugin. If you interested then
I'll describe all steps I've made.
1) I've used cvs2svn trunk version. (I've actually used bzr-svn to
convert your trunk to bzr branch but it's not related to end result I
believe). So I've used this revision of cvs2svn:
svn revno: 4942 (on /trunk)
committer: maxb
timestamp: Fri 2009-10-16 08:32:30 +0000
message:
run-tests: fix some out-of-date git-related comments.
Patch by: Greg Ward <greg at gerg.ca>
2) As described on your site
(http://cvs2svn.tigris.org/faq.html#repoaccess) I've rsynced entire CVS
repo of FTE project (http://sourceforge.net/projects/fte/) with command:
rsync -av rsync://fte.cvs.sourceforge.net/cvsroot/fte/* .
3) Then I've created cvs2bzr.bat batch file because your cvs2bzr script
has no extension and therefore won't work otherwise on Windows. The
content of my batch file is:
@C:\Python25\python.exe C:\work\OSS\cvs2svn\trunk\cvs2bzr %*
4) I've downloaded sort utility from http://gnuwin32.sf.net (coreutils
package). In the end it worked well enough IMO.
4) I've tried to run export to fastimport format via bzr-fastimport
plugin, but without any luck:
C:\work\OSS\FTE\fte.sf.net\FTE>bzr fast-export-from-cvs fte fte.fi
bzr: ERROR: cvs2bzr missing. Please install cvs2svn 2.30 or later and
try again.
This is apparently some windows-specific bug in bzr-fastimport plugin
and its maintainer (Ian Clatworthy) is already notified about this problem.
5) The I've tried to run conversion in naive way as it supposed to be
run from fast-export-from-cvs command (IIUC) with following command:
C:\work\OSS\FTE\fte.sf.net\FTE>cvs2bzr.bat --dumpfile fte.fi fte
It failed with traceback:
Traceback (most recent call last):
File "C:\work\OSS\cvs2svn\trunk\cvs2bzr", line 70, in <module>
bzr_main(os.path.basename(sys.argv[0]), sys.argv[1:])
File "C:\work\OSS\cvs2svn\trunk\cvs2svn_lib\main.py", line 114, in
bzr_main
run_options = BzrRunOptions(progname, cmd_args, pass_manager)
File "C:\work\OSS\cvs2svn\trunk\cvs2svn_lib\dvcs_common.py", line 48,
in __init__
RunOptions.__init__(self, progname, cmd_args, pass_manager)
File "C:\work\OSS\cvs2svn\trunk\cvs2svn_lib\run_options.py", line
267, in __init__
self.process_options()
File "C:\work\OSS\cvs2svn\trunk\cvs2svn_lib\dvcs_common.py", line 89,
in process_options
self.process_extraction_options()
File "C:\work\OSS\cvs2svn\trunk\cvs2svn_lib\git_run_options.py", line
156, in process_extraction_options
if not (options.blobfile and options.dumpfile):
AttributeError: Values instance has no attribute 'blobfile'
Now the error is obviously inside cvs2svn library. Even though I've
possibly used wrong command line I suppose cvs2bzr should not blow-up
with traceback into my face.
6) At this point I've decided to look at using options file. The options
example is overwhelmingly big. This is maybe useful for experts but for
me as casual user of cvs2bzr it was too much. In the end I need only
provide path to sort utility and change default paths to source CVS
repository and output dumpfile.
With valid options file I've managed to export CVS repo to fast-import
format.
cvs2bzr.bat --options=fte.options
Unfortunately I've discovered that resulting dump file has no texts for
all files at all. And after importing this dumpfile to bzr format I've
got correct revision history but all files has zero length.
As I discovered later the problem was in CVSNT executable which is used
by TortoiseCVS installed on my computer:
C:\>cvs version
Concurrent Versions System (CVSNT) 2.5.03 (Scorpio) Build 2382
(client/server)
7) So I've downloaded co.exe utility, unpack it to my working folder and
made corresponding changes in fte.options file. And ran conversion again.
This time conversion has finished successfully and all files was with
expected content.
8) To understand this effect better I've downloaded native cvs client
from http://ftp.gnu.org/non-gnu/cvs/binary/stable/x86-woe/ and unpack it
to my working folder. With cvs 1-11-22 export from CVS was successful again.
So CVSNT is no-no for conversion. Maybe it's mentioned in your FAQ but
I've discovered it myself.
9) For final conversion from fastimport dumpfile to bzr repository I've
used following command:
bzr fast-import fte.fi fte.bzr
Here: fte.fi is dumpfile and fte.bzr is resulting repo.
This command ran successfully and now I have valid mirror.
10) But I want to point to another issue with conversion: during/after
conversion cvs2bzr has created several dummy revisions to attach tags to
them. In bzr tags are very similar to tags in CVS and does not required
special commit. They should not clutter the main history. I suppose it's
svn-centric point of view and it leaked into this conversion. I'd say
it's a bug, because neither bzr not git (IIRC) does not required special
commit for tags.
It's not big deal for me right now, but if you decide to fix this I'll
be happy to run conversion again and test this point.
Wishlist:
a) simpler options/config file
b) don't create extra commits for tags
Thanks for your tool.
Alexander
More information about the bazaar
mailing list