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

Re: cvsimport/cvsps: wrong revisions in branch

From
Shawn O. Pearce <spearce@spearce.org>
Date
Jan 25, 2007, 17:52 UTC
Message-ID
<20070125175220.GC13089@spearce.org>
In-Reply-To
<45B8C032.7020004@fs.ei.tum.de>
Simon 'corecode' Schubert <corecode@fs.ei.tum.de> wrote:
Show 16 quoted lines
> Gerrit Pape wrote:
> >Hi, I struggle with importing a CVS repository into git to switch over
> >development.  In some branches there're differences in the source code
> >after importing into git.  We tracked this down to tags and branches
> >that where tagged partially in CVS, first a tag was set on one
> >subdirectory tree (sources), later on another subdirectory tree (docs).
> >This confuses cvsimport or cvsps, the tag in git after import doesn't
> >match the tag in CVS.
> 
> how do you expect this to ever work?  your tag is not a time stable one.  
> the tag spans multiple change sets.  best forget the whole tag thing, 
> seriously.  my cvs converter [1] already has a hard time reproducing 
> branches correctly.  doing this with tags is impossible.  svn can do this 
> because they don't have tags, so it is a kind of fake.  of course you could 
> do this in git as well by actually creating a branch for a tag, but it is 
> really messy.  just don't do that.

If you are importing your history you probably really do want the tags. As broken as they may be. Because they represent real state that you probably need to be able to recover in the future.

One could make the argument that most very old tags aren't worth importing, but certainly tags related to recent releases that are still in production use (and thus may need patching) are probably needed.

In Git the only way to really do this is to create a branch from a
nearby commit, then modify the branch until it conforms to the tag.
Do a series of evil merges from the relevant commits of each file
until you get the branch looking the way it needs to.  *THEN*
you tag it.
 
> [1]: <http://ww2.fs.ei.tum.de/~corecode/hg/fromcvs>, not 100% yet, but 
> probably the best you can get at the moment.  i'm a perfectionist, so i 
> might never call it "done".

Also probably the fastest CVS->Git converter publiclly available, as its backed by git-fast-import. :)

-- 
Shawn.
Previous: Simon 'corecode' SchubertNext: Martin Langhoff
Message 5 of 10 in “cvsimport/cvsps: wrong revisions in branch”
  1. Gerrit PapeJan 25, 2007
  2. Simon 'corecode' SchubertJan 25, 2007
  3. Uwe Kleine-KönigJan 25, 2007
  4. Simon 'corecode' SchubertJan 25, 2007
  5. Shawn O. PearceJan 25, 2007
  6. Martin LanghoffJan 26, 2007
  7. Simon 'corecode' SchubertJan 26, 2007
  8. Robin RosenbergJan 26, 2007
  9. Gerrit PapeJan 26, 2007
  10. Jakub NarebskiJan 26, 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.