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

Re: cvsimport bug on branches [was: conversion to git]

From
Steffen Prohaska <prohaska@zib.de>
Date
Sep 21, 2007, 05:18 UTC
Message-ID
<8D5EA3F4-9642-4604-963E-838D03650FBC@zib.de>
In-Reply-To
<46F31BBB.1040901@byu.net>
On Sep 21, 2007, at 3:17 AM, Eric Blake wrote:
Show 20 quoted lines
> According to Eric Blake on 9/19/2007 5:13 PM:
>> I'm working on converting M4 to git.
>>
>> The initial git conversion is complete.  Feel free to check it out:
>>
>> http://git.savannah.gnu.org/gitweb/?p=m4.git
>
> Unfortunately, after publishing this repository, I noticed that  
> there is a
> bug in git-cvsimport, when a vendor branch is created that contains  
> fewer
> files than the point it branched from.  Those files were not  
> removed from
> the commit on the new branch, which means the git repository  
> contains too
> many files compared to what the CVS repository had for any checkout  
> along
> the branch.
>
> [...]
git-cvsimport may have more problems, see e.g.

http://marc.info/?l=git&m=118385565913953&w=2 http://marc.info/?l=git&m=118260312708709&w=2

Show 7 quoted lines
> Now that the repository is published, what's the best way to  
> correct the
> history for the git m4-1.4.1 tag, to correctly pick the m4-1.4  
> commit as
> its parent, and to omit the files that were intentionally omitted  
> from the
> CVS branch it was imported from?

Hard to say. The best is to avoid git-cvsimport if you need to import branches correctly.

And you should do validate the result of any import by comparing a working copy checked out from CVS with a working copy checked out from git.

Never trust the cvs to git importers.
> What needs to be done to git-cvsimport to make it recognize files that
> were omitted from CVS branch creation points, to avoid this problem  
> in the
> first place?

I'd recommend not to use git-cvsimport but better use a different converter.

For me parsecvs [1] works.
I'd also give cvs2svn's git support [2] a try.

cvs2svn strives much harder to report errors and handle complex history correctly. parsecvs for example just crashes on corrupted RCS files, while cvs2svn reports the problem. But if your CVS repository is good parsecvs is much faster.

fromcvs/togit was also mentioned a couple of times on the list. It worked for me the last time I tried it. But I did no in depth validation of the result.

I still believe it would be good to add a warning to the documentation of git-cvsimport and provide links to alternatives.

	Steffen

[1] http://gitweb.freedesktop.org/?p=users/keithp/parsecvs.git [2] http://marc.info/?l=git&m=118592701426175&w=2

Previous: Eric BlakeNext: Linus Torvalds
Message 2 of 11 in “cvsimport bug on branches [was: conversion to git]”
  1. Eric BlakeSep 21, 2007
  2. Steffen ProhaskaSep 21, 2007
  3. Linus TorvaldsSep 21, 2007
  4. Robin RosenbergSep 21, 2007
  5. Johannes SchindelinSep 21, 2007
  6. Robin RosenbergSep 21, 2007
  7. Johannes SchindelinSep 21, 2007
  8. Robin RosenbergSep 21, 2007
  9. fromcvs installation [was: cvsimport bug on branches [was: conversion to git]]Steffen Prohaska, Sep 22, 2007
  10. Simon 'corecode' SchubertSep 22, 2007
  11. Martin LanghoffSep 22, 2007

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.