{"thread":{"id":"10258","subject":"Workflow: split repository?","startedAt":"2007-10-12T12:21:39Z","lastAt":"2007-10-12T14:57:01Z","messageCount":3,"participants":["Jan Wielemaker","Jan Hudec"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"55554","messageId":"200710121421.39159.wielemak@science.uva.nl","threadId":"10258","inReplyTo":null,"subject":"Workflow: split repository?","fromName":"Jan Wielemaker","fromEmail":"wielemak@science.uva.nl","sentAt":"2007-10-12T12:21:39Z","receivedAt":"2007-10-12T12:21:39Z","isPatch":false,"sender":{"key":"wielemak@science.uva.nl","avatar":null},"body":"Hi,\n\nI've got a big active project, until yesterday managed using CVS. As\nwith any distributed academic research project the repository has become\na nice mess where most files are in the wrong place and there are\nseveral almost independent sub-projects living in directories.\n\nThe plan is/was to\n\n\t* Convert everything to GIT (done, through cvs2svn)\n\t* Everyone keeps hacking on their bits, while one is starting\n\tto reorganise the structure by moving files and directories\n\tand changing import headers, and other file references in\n\ta GIT branch.\n\t* Now we merge the continued work and the reorganisation to\n\tend up with a nice clean hierarchy :-)\n\t* Split the big project into multiple projects.  One of the\n\treasons is that we want to make part of them public.  Others\n\twe cannot publish as they contain copyrighted data.  I understand\n\twe can reunite them using GIT sub modules.\n\nDoes this make sense?\n\nWhile splitting we want to *loose* history information for some of the\nprojects.  That is easy: simply create a new repository from the current\nfiles.  For some however we would like to *preserve* the history.  This\nmeans we would like to pick a hierarchy with its history.  After quite\na bit of reading, I get the impression this cannot be done.  Am I right?\n\nIs the only way to create a GIT repositiory right away from a subset of\nthe CVS for which we want to preserve the history?\n\n\tThanks --- Jan\n"},{"id":"55562","messageId":"20071012143043.GD7865@efreet.light.src","threadId":"10258","inReplyTo":"200710121421.39159.wielemak@science.uva.nl","subject":"Re: Workflow: split repository?","fromName":"Jan Hudec","fromEmail":"bulb@ucw.cz","sentAt":"2007-10-12T14:30:43Z","receivedAt":"2007-10-12T14:30:43Z","isPatch":false,"sender":{"key":"bulb@ucw.cz","avatar":null},"body":"On Fri, Oct 12, 2007 at 14:21:39 +0200, Jan Wielemaker wrote:\n> Hi,\n> \n> I've got a big active project, until yesterday managed using CVS. As\n> with any distributed academic research project the repository has become\n> a nice mess where most files are in the wrong place and there are\n> several almost independent sub-projects living in directories.\n> \n> The plan is/was to\n> \n> \t* Convert everything to GIT (done, through cvs2svn)\n> \t* Everyone keeps hacking on their bits, while one is starting\n> \tto reorganise the structure by moving files and directories\n> \tand changing import headers, and other file references in\n> \ta GIT branch.\n> \t* Now we merge the continued work and the reorganisation to\n> \tend up with a nice clean hierarchy :-)\n> \t* Split the big project into multiple projects.  One of the\n> \treasons is that we want to make part of them public.  Others\n> \twe cannot publish as they contain copyrighted data.  I understand\n> \twe can reunite them using GIT sub modules.\n> \n> Does this make sense?\n\nIt might make more sense to convert bit by bit, to separate git repositories.\nWould save you some git-filter-branch work.\n\n> While splitting we want to *loose* history information for some of the\n> projects.  That is easy: simply create a new repository from the current\n> files.  For some however we would like to *preserve* the history.  This\n> means we would like to pick a hierarchy with its history.  After quite\n> a bit of reading, I get the impression this cannot be done.  Am I right?\n\nIt can, but you have to be aware of the pitfalls. Git allows you to create\na new history, which is defined modification of the original history. There\nis git-filter-branch command, that can create a repository with just\na subtree and such. But it's a new, independent, history. You can't merge\nbetween the old and new one (but you can rebase the few commits someone made\nwhile you were converting) and anyone who has the old history in his repo\nwill still have it.\n\n> Is the only way to create a GIT repositiory right away from a subset of\n> the CVS for which we want to preserve the history?\n\nNo, it's not. It will save you work if you can do as much splitting as\npossible during the conversion, ie. convert the bits you know will be\nseparate separately (and combine them using submodules as appropriate).\n\nBut if you have bits that will take a lot of work to factor out, you can\nconvert to git, make the other code ready to use a submodule and than use\ngit-filter-branch to extract the right bits of history for the submodule.\n\n-- \n\t\t\t\t\t\t Jan 'Bulb' Hudec <bulb@ucw.cz>\n"},{"id":"55565","messageId":"200710121657.01256.wielemak@science.uva.nl","threadId":"10258","inReplyTo":"20071012143043.GD7865@efreet.light.src","subject":"Re: Workflow: split repository?","fromName":"Jan Wielemaker","fromEmail":"wielemak@science.uva.nl","sentAt":"2007-10-12T14:57:01Z","receivedAt":"2007-10-12T14:57:01Z","isPatch":false,"sender":{"key":"wielemak@science.uva.nl","avatar":null},"body":"Hi Jan,\n\nOn Friday 12 October 2007 16:30, Jan Hudec wrote:\n> On Fri, Oct 12, 2007 at 14:21:39 +0200, Jan Wielemaker wrote:\n> > Does this make sense?\n>\n> It might make more sense to convert bit by bit, to separate git\n> repositories. Would save you some git-filter-branch work.\n\n> > Is the only way to create a GIT repositiory right away from a subset of\n> > the CVS for which we want to preserve the history?\n>\n> No, it's not. It will save you work if you can do as much splitting as\n> possible during the conversion, ie. convert the bits you know will be\n> separate separately (and combine them using submodules as appropriate).\n>\n> But if you have bits that will take a lot of work to factor out, you can\n> convert to git, make the other code ready to use a submodule and than use\n> git-filter-branch to extract the right bits of history for the submodule.\n\nThanks!  git-filter-branch looks a bit overwhelming, but I think I can\nmanage :-)  I'll do the simple things in separate conversions.\n\n\tCheers --- Jan\n"}]}