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

Re: Some tips for doing a CVS importer

From
Jon Smirl <jonsmirl@gmail.com>
Date
Nov 26, 2006, 15:35 UTC
Message-ID
<9e4733910611260735g2b18e9d1p51a0dca153282cc7@mail.gmail.com>
In-Reply-To
<456969DA.6090702@gmx.net>
On 11/26/06, Marko Macek <marko.macek@gmx.net> wrote:
Show 27 quoted lines
> Jon Smirl wrote:
>
> >
> > SVN hides the mini branch by creating a symbol like this:
> >
> > Symbol XXX, change set 70
> > copy All from change set 50
> > copy file A from change set 55
> > copy file B,C from change set 60
> > copy file D from change set 61
> > copy file E,F,G from change set 63
> > copy file H from change set 67
> >
> > It has to do all of those copies because the change sets weren't
> > constructed while taking symbol dependency information into account.
> >
> > Symbol XXX can't copy from change set 69 because commits from after
> > the symbol was created are included in change sets 51-69.
>
> Sometimes it is not actually possible to have a 'simple' symbol, even
> by following proper symbol dependencies.
>
> Some situations:
> - tags on some files are readjusted later, or tagged separately with an older
>  version
> - tag is created with a -D "date" and the file times are not in sync
> - tag is created from a mixed-revision working copy

I agree that there are a few exceptions to making simple symbols. But the current cvs2svn makes no attempt at all to preserve simple symbols. In my attempts at converting Mozilla 60% of the symbols ended up as tiny branches. I investigated a couple by hand and was able to rearrange things to create simple symbols in every case I looked at.

This can be dealt with during the topological sort. If there are complex symbol creations you will end up with loops during the sort process. At that point you need to start breaking up change sets to remove the loops. You would use a heuristic at this point, something like try breaking up to ten commit change sets to preserve a symbol, if you can't preserve it with 10 breaks then break the symbol once and try again, repeat until the loop is gone.

The current cvs2svn code effectively implements a heuristic when the commits are always preserved at the expense of breaking the symbols. Since some commit comments are very common comments (blank ones) those commits get combined into bigger change sets and trash the simple symbols.

Another note for doing a converter. When combining things into change sets, for git import the comments in the branches should not be mixed between branches and the trunk when detecting change set. Git doesn't allow simultaneous commits to the trunk and branches.

Show 15 quoted lines
> While in the cases of 'time warp' the revision sequence should be
> considered more important than timestamps, this is not necessarily
> true for tags, since it's easily possible to create them on mixed
> revisions.
>
> cvs2svn also has a problem with vendor branches because it creates
> tags/branches that contain files from vendor branch by copying some
> files from the trunk and other files from the vendor branch.
> If the vendor branch/tag was only used for the initial import,
> it's IMO best to skip them in the conversion (this needs a patch).
> There are however problems because keyword expansion causes file
> differences.
>
> It seems that mozilla CVS repository has vendor branches/imports in
> some parts of the tree.
I never got around to checking out problems with vendor branches in Mozilla.
>
> Mark
>
>
-- 
Jon Smirl
Previous: Marko MacekNext: Marko Macek
Message 19 of 30 in “Some tips for doing a CVS importer”
  1. Jon SmirlNov 20, 2006
  2. Martin LanghoffNov 20, 2006
  3. Jon SmirlNov 20, 2006
  4. Martin LanghoffNov 21, 2006
  5. Carl WorthNov 21, 2006
  6. Jon SmirlNov 21, 2006
  7. Shawn PearceNov 21, 2006
  8. lamikrNov 21, 2006
  9. Shawn PearceNov 21, 2006
  10. Robin RosenbergNov 23, 2006
  11. Shawn PearceNov 25, 2006
  12. Petr BaudisNov 21, 2006
  13. Shawn PearceNov 21, 2006
  14. Johannes SchindelinNov 21, 2006
  15. Johannes SixtNov 23, 2006
  16. Martin LanghoffNov 21, 2006
  17. Jon SmirlNov 21, 2006
  18. Marko MacekNov 26, 2006
  19. Jon SmirlNov 26, 2006
  20. Marko MacekNov 26, 2006
  21. Jon SmirlNov 26, 2006
  22. Michael HaggertyNov 27, 2006
  23. Shawn PearceNov 21, 2006
  24. Michael HaggertyNov 27, 2006
  25. Markus SchiltknechtNov 27, 2006
  26. Michael HaggertyNov 27, 2006
  27. Markus SchiltknechtNov 28, 2006
  28. Michael HaggertyNov 30, 2006
  29. Daniel JacobowitzNov 30, 2006
  30. Jon SmirlNov 27, 2006

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.