{"thread":{"id":"8738","subject":"GIT + CVS workflow query.","startedAt":"2007-06-26T22:20:24Z","lastAt":"2007-06-27T00:36:56Z","messageCount":3,"participants":["Eoin Hennessy","Yann Dirson","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"45853","messageId":"47281e410706261520r5b3549c7t39d93924d0a8ceea@mail.gmail.com","threadId":"8738","inReplyTo":null,"subject":"GIT + CVS workflow query.","fromName":"Eoin Hennessy","fromEmail":"eoin.hennessy@gmail.com","sentAt":"2007-06-26T22:20:24Z","receivedAt":"2007-06-26T22:20:24Z","isPatch":false,"sender":{"key":"eoin.hennessy@gmail.com","avatar":null},"body":"Hi there,\n\nI'd like to use GIT to track changes in a CVS repository. As well as\ntracking changes, I will also need to push patches back to CVS from\nGIT. My workflow is currently as follows:\n\n  - Use git-cvsimport to import and update a mirror of the CVS\nrepository; 'project.git'.\n - Pull changes from the mirror to a cloned working copy; 'project'.\n - Fix bugs in the working copy and push commits back to the mirror.\n  - Use git-cherry to identify commits in master not currently in the\nbranch updated by git-cvsimport. Then use git-cvsexportcommit to push\nthese commits into a CVS checkout.\n\nMy question is; as a next step in the workflow, should I be applying\nthe list of commits identified by git-cherry to the branch updated by\ngit-cvsimport? How else does one clear this list so that they do not\ninterfere with the next iteration of the workflow.\n\nI hope I've been clear, and thanks for any suggestions.\n"},{"id":"45856","messageId":"20070626224659.GH7730@nan92-1-81-57-214-146.fbx.proxad.net","threadId":"8738","inReplyTo":"47281e410706261520r5b3549c7t39d93924d0a8ceea@mail.gmail.com","subject":"Re: GIT + CVS workflow query.","fromName":"Yann Dirson","fromEmail":"ydirson@altern.org","sentAt":"2007-06-26T22:46:59Z","receivedAt":"2007-06-26T22:46:59Z","isPatch":false,"sender":{"key":"ydirson@altern.org","avatar":"https://avatars.githubusercontent.com/u/1190950?v=4"},"body":"On Tue, Jun 26, 2007 at 11:20:24PM +0100, Eoin Hennessy wrote:\n> Hi there,\n> \n> I'd like to use GIT to track changes in a CVS repository. As well as\n> tracking changes, I will also need to push patches back to CVS from\n> GIT. My workflow is currently as follows:\n\nI have done a similar thing for some time, with some differences.\n\n>  - Use git-cvsimport to import and update a mirror of the CVS\n> repository; 'project.git'.\n> - Pull changes from the mirror to a cloned working copy; 'project'.\n> - Fix bugs in the working copy\n\nYes.\n\n> and push commits back to the mirror.\n\nNo, the mirror should solely be a mirror of cvs.  If you de-sync your\nmirror, you're looking for trouble.\n\n>  - Use git-cherry to identify commits in master not currently in the\n> branch updated by git-cvsimport. Then use git-cvsexportcommit to push\n> these commits into a CVS checkout.\n\nRather, the patches you have not committed yet are simply\nremotes/origin/master..master.  What I did was simply\ngit-cvsexportcommit'ing them to my \"CVS gateway checkout\".\n\nIn the next iteration, cvsps will identify your commits as patchsets,\nand what I did was registering the \"merge to cvs\" with an info/grafts\nentry.  Nowaday, I would rather have my local commits in an stgit\nstack, and \"stg pull\" would take care of detecting the merged patches\n(not to mention that uncommitted patches would trivially map to stgit\npatches).\n\n\nBut I occasionally had problems of cvs patches missed by the import,\nand other issues because of cvsps not being able to cope with branches\ncreated by cvs 1.12 (which is why I changed my workflow and wrote\nstg-cvs, which in turn needs to be replaced).\n\nHope this helps,\n-- \nYann\n"},{"id":"45862","messageId":"7vbqf2xmfr.fsf@assigned-by-dhcp.pobox.com","threadId":"8738","inReplyTo":"47281e410706261520r5b3549c7t39d93924d0a8ceea@mail.gmail.com","subject":"Re: GIT + CVS workflow query.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-06-27T00:36:56Z","receivedAt":"2007-06-27T00:36:56Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Eoin Hennessy\" <eoin.hennessy@gmail.com> writes:\n\n> I'd like to use GIT to track changes in a CVS repository. As well as\n> tracking changes, I will also need to push patches back to CVS from\n> GIT. My workflow is currently as follows:\n>\n> - Use git-cvsimport to import and update a mirror of the CVS\n>    repository; 'project.git'.\n> - Pull changes from the mirror to a cloned working copy; 'project'.\n> - Fix bugs in the working copy and push commits back to the mirror.\n\nFix bugs, yes, but push back to the mirror is probably not what\nyou want.\n\n> - Use git-cherry to identify commits in master not currently in the\n>   branch updated by git-cvsimport. Then use git-cvsexportcommit to push\n>   these commits into a CVS checkout.\n\nWhat I do with my day-job project is that I keep a separate CVS\ncheckout like you do, and\n\n - cvsimport keeps track of the \"project.git\" mirror as you do;\n - pull changes from that to my \"project\" as you do (but see below);\n - fix things in \"project\", as you do;\n - identify the needed changes with 'git-cherry' as you do;\n - exportcommit to push them back to CVS through the CVS checkout;\n \nThen the next cvsimport will get my changes (among other\npeople's changes) to \"project.git\".  \n\n - fetch changes from the \"project.git\" to my \"project\";\n - 'git-rebase' my changes on top of the tip of \"project.git\";\n\nThis will remove the duplicates that I had but now are in CVS.\n"}]}