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

Re: Getting CVS and Git to play nicely in the same box

From
Robin Rosenberg <robin.rosenberg.lists@dewire.com>
Date
Nov 30, 2006, 22:21 UTC
Message-ID
<200611302321.19129.robin.rosenberg.lists@dewire.com>
In-Reply-To
<1164890354.21950.92.camel@okra.transitives.com>
torsdag 30 november 2006 13:39 skrev Alex Bennee:
Show 47 quoted lines
> Hi,
>
> I'm trying to get a setup where I can use git for my day to day coding
> on problems but still mirror a CVS repo. The situation is muddied
> slightly by the way we manage changes in our CVS repository and
> baselines.
>
> The CVS manner of working means we create a branch at a given point to
> do work on it:
>
>           BL1_CH2
>          /
>         /
>        BL1_CH1
> BL1---/
>
> And then in the meantime a new baseline may be released:
>
>
> BL2    BL1_CH2
>
> |     /
> |     BL1_CH1
>
> BL1--/
>
> So we employ the "cvs -q update -dP -j BL1 -j BL2" on our development
> branch
>
>           BL2_CH2
>          /
> BL2     BL1_CH2
>
> |      /
> |    BL1_CH1
>
> BL1--/
>
> I want to mirror this sort of behaviour it git (basically making the
> cvs -j -j operation a git merge, separate from the normal development
> track). I however also need to maintain the CVS meta-data so when I get to
> given points I can commit my work into the main development server.
>
> I can set up a git repo that ignore all the CVS gubbins with exclude info
> but the CVS metadata gets in the way. I think I have to maintain two git
> repos, one that tracks the baseline and one which is a clone (which can
> then pull updates) but has the CVS meta data for my development branch.

You don't need to use GIT to track metadata (I asume you mean CVS/Entries) is not necessary. Use a plain CVS checkout for that and cvsexportcommit to it.

> However CVS does seem to get very confused when the world moves under it
> when you switch branches in GIT.
Exaktly. Forget about it, it won't work and there is a simpler solution.
> Has anyone successfully set up such a working environment? Can anyone offer
> any tips on how to make it all work nicely?
My setup is like this:
- A tracking repo on a server runs git-cvsimport every night.
- I pull from the tracking repo
- I have a CVS checkout for the branch I'm interested in committing to
- Then I use cvsexportcommit to export changes back to CVS. Actuallly I use a 
small script that runs cvs update and then exports the changes defined by a 
named commit so I say "tocvs a-commitid--tag-or-stgit-patch-name".

Since I use StGit I get no problem from my changes coming back through the cvsimport executed on the server. StGit makes the patches empty when my own code returns from CVS.

Previous: Jakub Narebski
Message 5 of 5 in “Getting CVS and Git to play nicely in the same box”
  1. Alex BenneeNov 30, 2006
  2. Jakub NarebskiNov 30, 2006
  3. Alex BenneeNov 30, 2006
  4. Jakub NarebskiNov 30, 2006
  5. Robin RosenbergNov 30, 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.