git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* cvs2svn conversion directly to git ready for experimentation
@ 2007-08-01  0:09 Michael Haggerty
  2007-08-01  0:41 ` Johannes Schindelin
                   ` (3 more replies)
  0 siblings, 4 replies; 40+ messages in thread
From: Michael Haggerty @ 2007-08-01  0:09 UTC (permalink / raw)
  To: git; +Cc: users

I am the maintainer of cvs2svn[1], which is a program for one-time
conversions from CVS to Subversion.  cvs2svn is very robust against the
many peculiarities of CVS and can convert just about every CVS
repository we have ever seen.

I've been working on a cvs2svn output pass that writes the converted CVS
repository directly into git rather than Subversion.  The code runs now
with at least one repository from our test suite of nasty CVS repositories.

Unfortunately, I am a complete git newbie, so I would very much
appreciate help from the git community with feedback and checking
whether the conversion output is reasonable and gitlike.

The git output is very preliminary and virtually untested, and has the
following limitations (hopefully to be removed in the near future):

- It is rather slow.  Among other things, it still uses RCS or CVS to
extract the contents of the CVS revisions, which will soon be changed to
win a factor of 2 or so.

- CVS allows a branch to be created from arbitrary combinations of
source revisions and/or source branches.  cvs2svn tries to create a
branch from a single source, but if it can't figure out how to, it
creates the branch using "merge" from multiple sources.  In pathological
situations, the number of merge sources for a branch can be arbitrarily
large.

- It is not very intelligent about creating tags.  When asked to create
a tag, it unconditionally creates a "tag fixup branch"[2] with the same
name and contents as the tag, then tags this branch.  The tag fixup
branch is never deleted.

- There are no checks that CVS branch and tag names are legal git names,
or indeed that any other similar limitations of git are honored.

- The data that should be fed to git-fast-input is written to two files,
which have to be loaded into git-fast-import manually.  Eventually I
will add an option to invoke git-fast-import automatically and pipe the
output directly into git-fast-import.

- Only single projects can be converted at a time.  I don't think that
this will be a significant limitation when outputting to git.


To try it out:

1. Install svn (to be able to check out cvs2svn) and either cvs or rcs.

2. Check out the current trunk version of cvs2svn:

    svn co http://cvs2svn.tigris.org/svn/cvs2svn/trunk cvs2svn-trunk
    cd cvs2svn-trunk
    make check # ...optional

3. Configure cvs2svn for your conversion.  This has to be done via the
"options-file method"[3].  See cvs2svn-example.options and
test-data/main-cvsrepos/cvs2svn-git.options as examples; the former file
includes voluminous documentation.

4. Run cvs2svn.  This outputs two git-fast-import files, with the names
specified by your options file.  In the example, these files are named
'cvs2svn-tmp/git-blob.dat' and 'cvs2svn-tmp/git-dump.dat'.

5. Initialize a git repository, and load the dump files using
git-fast-import:

    git-init
    cat cvs2svn-tmp/git-blob.dat | \
        git-fast-import --export-marks=cvs2svn-tmp/git-marks.dat
    cat cvs2svn-tmp/git-dump.dat | \
        git-fast-import --import-marks=cvs2svn-tmp/git-marks.dat


I am looking forward to your feedback.  Even better would be if somebody
wants to join forces on this project.  I would be happy to supply the
cvs2svn knowledge if you can bring the git experience.

Michael


[1] http://cvs2svn.tigris.org/
[2] http://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html
[3] http://cvs2svn.tigris.org/cvs2svn.html#cmd-vs-options

^ permalink raw reply	[flat|nested] 40+ messages in thread

end of thread, other threads:[~2007-08-05  7:58 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-01  0:09 cvs2svn conversion directly to git ready for experimentation Michael Haggerty
2007-08-01  0:41 ` Johannes Schindelin
2007-08-01 22:09 ` Jakub Narebski
2007-08-02 16:58   ` Michael Haggerty
2007-08-02 23:44   ` Jon Smirl
2007-08-02  8:49 ` Steffen Prohaska
2007-08-02 17:23   ` Michael Haggerty
2007-08-02 19:22     ` Marko Macek
2007-08-02 23:59     ` Jon Smirl
2007-08-05  7:58       ` Oswald Buddenhagen
2007-08-02 17:35   ` Simon 'corecode' Schubert
2007-08-02 19:13     ` Steffen Prohaska
2007-08-02 19:29       ` Simon 'corecode' Schubert
2007-08-02 20:21         ` Robin Rosenberg
     [not found]           ` <200708022221.13129.robin.rosenberg.lists-RgPrefM1rjDQT0dZR+AlfA@public.gmane.org>
2007-08-02 20:31             ` Lübbe Onken
2007-08-02 20:32           ` Lübbe Onken
2007-08-02 20:33           ` Lübbe Onken
2007-08-02 22:02         ` Steffen Prohaska
2007-08-02 22:50           ` Simon 'corecode' Schubert
2007-08-02 23:50             ` Michael Haggerty
2007-08-03  8:40               ` Simon 'corecode' Schubert
2007-08-04  8:28             ` Steffen Prohaska
2007-08-03  3:07         ` Shawn O. Pearce
2007-08-02 23:37       ` Michael Haggerty
2007-08-02 20:43   ` Linus Torvalds
2007-08-02 23:19     ` Michael Haggerty
2007-08-03  3:12       ` Shawn O. Pearce
2007-08-02 23:55   ` Jon Smirl
     [not found] ` <8b65902a0708010438s24d16109k601b52c04cf9c066@mail.gmail.com>
2007-08-02 15:34   ` Michael Haggerty
2007-08-02 23:08     ` Martin Langhoff
2007-08-03  4:03       ` Johannes Schindelin
2007-08-03  6:48         ` Steffen Prohaska
2007-08-03  7:10       ` Steffen Prohaska
2007-08-03  8:36       ` Michael Haggerty
2007-08-03 14:35         ` Patwardhan, Rajesh
2007-08-03 15:41           ` Jon Smirl
2007-08-03 16:42             ` Patwardhan, Rajesh
2007-08-03 18:58             ` Michael Haggerty
2007-08-03 20:16               ` Jon Smirl
2007-08-03 20:27                 ` Jon Smirl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).