{"thread":{"id":"12853","subject":"Hand-rolling migration to Git","startedAt":"2008-03-25T10:03:20Z","lastAt":"2008-03-31T06:23:27Z","messageCount":4,"participants":["Peter Karlsson","Johan Herland","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"73022","messageId":"Pine.LNX.4.64.0803251056570.8472@ds9.cixit.se","threadId":"12853","inReplyTo":null,"subject":"Hand-rolling migration to Git","fromName":"Peter Karlsson","fromEmail":"peter@softwolves.pp.se","sentAt":"2008-03-25T10:03:20Z","receivedAt":"2008-03-25T10:03:20Z","isPatch":false,"sender":{"key":"peter@softwolves.pp.se","avatar":"https://avatars.githubusercontent.com/u/990764?v=4"},"body":"Hi!\n\nI am looking for documentation on how to hand-roll a conversion to Git,\nbut I keep getting lost in the maze of similar-looking man pages. Is\nthere a tutorial, howto, or perhaps even just a list of recommended man\npages to read on importing project changes to Git?\n\nI have projects of two different kinds that I need to import:\n\n1. The \"make a copy of the source code directory and edit the new copy\"\nsource management system. I need to be able to import one directory at\na time, each describing a version controlled state. The date stamp on\nthe commits should probably be the most recent file in each directory.\n\n2. A piece of software using PVCS (a RCS-like version control system\nwith added support for parallel development (using a locking model)). I\nhave a complete \"trail file\" which lists all commits done to the\nrepository in chronological order since the repository was created, and\ncan use that as a base. Since it has no concept of an atomic commit, I\nneed to semi-manually join commits by walking the trail file and\ncomparing lock sets, time stamps, commit messages and authors.\n\nI can probably make the output from (2) look like from (1), so I\nbasically just need to find a pointer to information on how to\n(re-)create the history with Git.\n\n-- \n\\\\// Peter - http://www.softwolves.pp.se/\n"},{"id":"73023","messageId":"200803251114.55673.johan@herland.net","threadId":"12853","inReplyTo":"Pine.LNX.4.64.0803251056570.8472@ds9.cixit.se","subject":"Re: Hand-rolling migration to Git","fromName":"Johan Herland","fromEmail":"johan@herland.net","sentAt":"2008-03-25T10:14:55Z","receivedAt":"2008-03-25T10:14:55Z","isPatch":false,"sender":{"key":"johan@herland.net","avatar":"https://avatars.githubusercontent.com/u/547031?v=4"},"body":"On Tuesday 25 March 2008, Peter Karlsson wrote:\n> Hi!\n> \n> I am looking for documentation on how to hand-roll a conversion to Git,\n> but I keep getting lost in the maze of similar-looking man pages. Is\n> there a tutorial, howto, or perhaps even just a list of recommended man\n> pages to read on importing project changes to Git?\n> \n> I have projects of two different kinds that I need to import:\n> \n> 1. The \"make a copy of the source code directory and edit the new copy\"\n> source management system. I need to be able to import one directory at\n> a time, each describing a version controlled state. The date stamp on\n> the commits should probably be the most recent file in each directory.\n> \n> 2. A piece of software using PVCS (a RCS-like version control system\n> with added support for parallel development (using a locking model)). I\n> have a complete \"trail file\" which lists all commits done to the\n> repository in chronological order since the repository was created, and\n> can use that as a base. Since it has no concept of an atomic commit, I\n> need to semi-manually join commits by walking the trail file and\n> comparing lock sets, time stamps, commit messages and authors.\n> \n> I can probably make the output from (2) look like from (1), so I\n> basically just need to find a pointer to information on how to\n> (re-)create the history with Git.\n\nTake a look at git-fast-import. It should be relatively easy to write a small script that converts from either (1) or (2) to a stream of git-fast-import commands.\n\n\nHave fun! :)\n\n...Johan\n\n-- \nJohan Herland, <johan@herland.net>\nwww.herland.net\n"},{"id":"73027","messageId":"alpine.LSU.1.00.0803251137580.10660@wbgn129.biozentrum.uni-wuerzburg.de","threadId":"12853","inReplyTo":"200803251114.55673.johan@herland.net","subject":"Re: Hand-rolling migration to Git","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-03-25T10:39:19Z","receivedAt":"2008-03-25T10:39:19Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 25 Mar 2008, Johan Herland wrote:\n\n> On Tuesday 25 March 2008, Peter Karlsson wrote:\n> \n> > I am looking for documentation on how to hand-roll a conversion to \n> > Git, but I keep getting lost in the maze of similar-looking man pages. \n> > Is there a tutorial, howto, or perhaps even just a list of recommended \n> > man pages to read on importing project changes to Git?\n> > \n> > I have projects of two different kinds that I need to import:\n> > \n> > 1. The \"make a copy of the source code directory and edit the new \n> >    copy\"  source management system. I need to be able to import one \n> >    directory at a time, each describing a version controlled state. \n> >    The date stamp on the commits should probably be the most recent \n> >    file in each directory.\n> > \n> > 2. A piece of software using PVCS (a RCS-like version control system \n> >    with added support for parallel development (using a locking \n> >    model)). I have a complete \"trail file\" which lists all commits \n> >    done to the repository in chronological order since the repository \n> >    was created, and can use that as a base. Since it has no concept of \n> >    an atomic commit, I need to semi-manually join commits by walking \n> >    the trail file and comparing lock sets, time stamps, commit \n> >    messages and authors.\n> > \n> > I can probably make the output from (2) look like from (1), so I \n> > basically just need to find a pointer to information on how to \n> > (re-)create the history with Git.\n> \n> Take a look at git-fast-import. It should be relatively easy to write a \n> small script that converts from either (1) or (2) to a stream of \n> git-fast-import commands.\n\nYeah.  To get inspiration how the scripts should look like, read \ncontrib/fast-import/import-tars.perl, or look at \nhttp://repo.or.cz/w/fast-export.git\n\nHth,\nDscho\n"},{"id":"73413","messageId":"Pine.LNX.4.64.0803310720520.26808@ds9.cixit.se","threadId":"12853","inReplyTo":"alpine.LSU.1.00.0803251137580.10660@wbgn129.biozentrum.uni-wuerzburg.de","subject":"Re: Hand-rolling migration to Git","fromName":"Peter Karlsson","fromEmail":"peter@softwolves.pp.se","sentAt":"2008-03-31T06:23:27Z","receivedAt":"2008-03-31T06:23:27Z","isPatch":false,"sender":{"key":"peter@softwolves.pp.se","avatar":"https://avatars.githubusercontent.com/u/990764?v=4"},"body":"Johannes Schindelin:\n\n>> Take a look at git-fast-import. It should be relatively easy to write a \n>> small script that converts from either (1) or (2) to a stream of \n>> git-fast-import commands.\n\n> Yeah.  To get inspiration how the scripts should look like, read \n> contrib/fast-import/import-tars.perl, or look at \n> http://repo.or.cz/w/fast-export.git\n\nI've played a bit with git-fast-import, but I sort of failed to get\nsomething working for PVCS export (see other thread).\n\nThe import-tars.perl script, however, was a very good idea. The\nsimplest solutions for the multiple-directories source I had was just\nto tar it up and feed through import-tars.perl. After importing it into\nGit and repacking it with a suitably large --window argument, I had a\nGit repository of 64 megabytes, down from the four or so gigabytes of\nuncompressed directories. That did include removing some object files,\nthough (but keeping some .exe's).\n\n-- \n\\\\// Peter - http://www.softwolves.pp.se/\n"}]}