git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Git and cvsimport

From
NNick <oinksocket@letterboxes.org>
Date
Apr 27, 2010, 11:57 UTC
Message-ID
<4BD6D128.7030403@letterboxes.org>
In-Reply-To
<l2w717f7a3e1004270341lea6cfe2aqdf8d2b490b1ec067@mail.gmail.com>
Marin Atanasov wrote:
> I want to convert CVS repo to a Git one.

If you don't care about incrementally updating the Git repo from the CVS one, I suggest you don't use git-cvsimport. It can make mistakes in the translation, especially with large and old repositories. On the other hand, git-cvsimport is currently the only tool which can incrementally import changes from CVS, i.e. co-exist with it.

cvs2git is a tool which worked more reliably for me, but it can only make a one-off conversion. Also, you might need to tidy up the result afterwards - removing crufty tags, unrelated directories, correcting committer identities, etc. git-filter-branch may be useful here.

If you do care about co-existing with CVS, I find it gets to be hard work, especially if your CVS repo has branches you have to follow - so really I'd suggest you reconsider and only try it if you really have no choice.

In that case you may want to write a wrapper script for git-cvsimport/exportcommit commands to reduce the complexity of using them. I've attempted this, and it sort of works for me, but the result is not really satisfactory, I find it's still liable to break on encountering random things cvsimport/cvsexportcommit can't handle, and then you need to fix things manually (although usually this can be done in Git). Ask me if you want to know more.

git-cvssever may be another option, if your CVS users agree, but I've no experience with it.

My preferred strategy is to persuade my colleagues to abandon CVS entirely.
Cheers,
N
Previous: Michael J GruberNext: Tor Arntsen
Message 5 of 8 in “Git and cvsimport”
  1. Marin AtanasovApr 26, 2010
  2. Michael J GruberApr 27, 2010
  3. Marin AtanasovApr 27, 2010
  4. Michael J GruberApr 27, 2010
  5. NickApr 27, 2010
  6. Tor ArntsenApr 27, 2010
  7. Marin Atanasov NikolovApr 28, 2010
  8. Andreas SchwabApr 28, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.