{"thread":{"id":"7276","subject":"Initializing svn repo from git","startedAt":"2007-03-16T21:40:46Z","lastAt":"2007-03-24T22:35:17Z","messageCount":2,"participants":["Chris Riddoch","Eric Wong"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"37278","messageId":"6efbd9b70703161440h762bd340x787f3258bc8dfcdc@mail.gmail.com","threadId":"7276","inReplyTo":null,"subject":"Initializing svn repo from git","fromName":"Chris Riddoch","fromEmail":"riddochc@gmail.com","sentAt":"2007-03-16T21:40:46Z","receivedAt":"2007-03-16T21:40:46Z","isPatch":false,"sender":{"key":"riddochc@gmail.com","avatar":null},"body":"Hi, folks.  This is probably targeted at Eric Wong, but any assistance\nis welcome.  I asked on #git, and decideded that a larger audience\nmight be interested in this question, and whatever its answer turns\nout to be.\n\nI've been working on a project, and tracking its history in git.  Due\nto lack of windows support, and windows-only developers joining my\nproject, my higher-ups decided that we needed to use SVN.  I expect\nI'll probably use git-svn, myself, but I'm faced with a task:\n\nI need to use the contents of my git repository, which is *very*\nlinear with only one branch, to fill in some history for a new, empty\nsvn repository.\n\nMy current steps, which isn't complete (identifiers cleaned out to\nprotect... well, me.)\n\n$ git svn init  svn://server/project project\n$ cd project\nproject$ git svn fetch\nFetching git-svn\nr0 = df2d1a798e85c75b9abbfd22fe06ff651a8fa9dd\nproject$ git pull /git/project\nwarning: no common commits\nremote: Generating pack...\nremote: Done counting 850 objects.\nremote: Deltifying 850 objects.\n...\n\nproject$ git log\ncommit <sha>\nMerge: <sha>... <sha>...\nAuthor: Chris Riddoch\nDate: Fri Mar 16 15:13:58 2007 -0600\n\n    Merge /git/project/\n\ncommit <sha>\nAuthor: (no author) <(no author)@641bd306-a92b-0410-b27c-7dcbb122c54d>\nDate:   Wed Mar 14 20:41:10 2007 +0000\n\n    git-svn-id: svn://server/project@0 641bd306-a92b-0410-b27c-7dcbb122c54d\n\ncommit <sha>\nAuthor: Chris Riddoch\nDate:   Tue Mar 13 13:54:21 2007 -0600\n\n    Most recent commit\n\n<skipping a bunch>\n\ncommit <sha>\nAuthor: Chris Riddoch\nDate:   Thu Feb 1 10:55:42 2007 -0700\n\n    Initial commit of project\n\n\n\nUm... now what?  Can someone walk me through this?\n\nOh, how I wish for a native Windows version of git.  That's the\n*right* solution, I know.\n\n-- \nepistemological humility\n  Chris Riddoch\n"},{"id":"37900","messageId":"20070324223517.GA26593@muzzle","threadId":"7276","inReplyTo":"6efbd9b70703161440h762bd340x787f3258bc8dfcdc@mail.gmail.com","subject":"Re: Initializing svn repo from git","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2007-03-24T22:35:17Z","receivedAt":"2007-03-24T22:35:17Z","isPatch":false,"sender":{"key":"e@80x24.org","avatar":null},"body":"Chris Riddoch <riddochc@gmail.com> wrote:\n> Hi, folks.  This is probably targeted at Eric Wong, but any assistance\n\nIn that case, feel free to Cc: me so I see it sooner :)\n\n> is welcome.  I asked on #git, and decideded that a larger audience\n> might be interested in this question, and whatever its answer turns\n> out to be.\n> \n> I've been working on a project, and tracking its history in git.  Due\n> to lack of windows support, and windows-only developers joining my\n> project, my higher-ups decided that we needed to use SVN.  I expect\n> I'll probably use git-svn, myself, but I'm faced with a task:\n> \n> I need to use the contents of my git repository, which is *very*\n> linear with only one branch, to fill in some history for a new, empty\n> svn repository.\n> \n> My current steps, which isn't complete (identifiers cleaned out to\n> protect... well, me.)\n> \n> $ git svn init  svn://server/project project\n> $ cd project\n> project$ git svn fetch\n> Fetching git-svn\n> r0 = df2d1a798e85c75b9abbfd22fe06ff651a8fa9dd\n\nWith completely linear history, you can probably use grafts and add\ndf2d1a798e85c75b9abbfd22fe06ff651a8fa9dd as a parent of your original,\ninitial commit.   Afterwards, running dcommit should just work.  (I've\nnever tried this, though).\n\n> project$ git pull /git/project\n> warning: no common commits\n> remote: Generating pack...\n> remote: Done counting 850 objects.\n> remote: Deltifying 850 objects.\n> ...\n> \n> project$ git log\n> commit <sha>\n> Merge: <sha>... <sha>...\n> Author: Chris Riddoch\n> Date: Fri Mar 16 15:13:58 2007 -0600\n> \n>    Merge /git/project/\n> \n> commit <sha>\n> Author: (no author) <(no author)@641bd306-a92b-0410-b27c-7dcbb122c54d>\n> Date:   Wed Mar 14 20:41:10 2007 +0000\n> \n>    git-svn-id: svn://server/project@0 641bd306-a92b-0410-b27c-7dcbb122c54d\n> \n> commit <sha>\n> Author: Chris Riddoch\n> Date:   Tue Mar 13 13:54:21 2007 -0600\n> \n>    Most recent commit\n> \n> <skipping a bunch>\n> \n> commit <sha>\n> Author: Chris Riddoch\n> Date:   Thu Feb 1 10:55:42 2007 -0700\n> \n>    Initial commit of project\n> \n> \n> \n> Um... now what?  Can someone walk me through this?\n\nThat will probably force you to discard your git-only history\nin SVN or have you duplicate history, neither is what you want.\nIf it's not too late; I recommend you start over with the\nabove instructions.\n\n-- \nEric Wong\n"}]}