{"thread":{"id":"9612","subject":"git-svnimport: what to do after -i?","startedAt":"2007-08-22T15:33:25Z","lastAt":"2007-08-24T01:06:19Z","messageCount":8,"participants":["Jing Xue","Steven Walter","Julian Phillips"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"51263","messageId":"20070822113325.1bihryuk4gko8kgs@intranet.digizenstudio.com","threadId":"9612","inReplyTo":null,"subject":"git-svnimport: what to do after -i?","fromName":"Jing Xue","fromEmail":"jingxue@digizenstudio.com","sentAt":"2007-08-22T15:33:25Z","receivedAt":"2007-08-22T15:33:25Z","isPatch":false,"sender":{"key":"jingxue@digizenstudio.com","avatar":null},"body":"\nI am new to git. Last night I used \"git svnimport -i\" to import a svn  \nproject. It finished successfully. The only problem now is I can't  \nseem to be able to checkout a working copy. In other words, I have a  \n'projectFoo' directory, with only .git in it, but not any actual  \nworking files. \"git-branch\" shows two branches, master and origin.  \n\"git-checkout master\" returns successfully, but does nothing.\n\nI guess that's because I used -i without fully understanding what it  \nimplies. Is there any way to checkout a working directory?\n\nThanks in advance for any ideas.\n-- \nJing Xue\n"},{"id":"51271","messageId":"20070822165846.GA17815@dervierte","threadId":"9612","inReplyTo":"20070822113325.1bihryuk4gko8kgs@intranet.digizenstudio.com","subject":"Re: git-svnimport: what to do after -i?","fromName":"Steven Walter","fromEmail":"stevenrwalter@gmail.com","sentAt":"2007-08-22T16:58:47Z","receivedAt":"2007-08-22T16:58:47Z","isPatch":false,"sender":{"key":"stevenrwalter@gmail.com","avatar":"https://avatars.githubusercontent.com/u/79127?v=4"},"body":"On Wed, Aug 22, 2007 at 11:33:25AM -0400, Jing Xue wrote:\n> \n> I am new to git. Last night I used \"git svnimport -i\" to import a svn  \n> project. It finished successfully. The only problem now is I can't  \n> seem to be able to checkout a working copy. In other words, I have a  \n> 'projectFoo' directory, with only .git in it, but not any actual  \n> working files. \"git-branch\" shows two branches, master and origin.  \n> \"git-checkout master\" returns successfully, but does nothing.\n> \n> I guess that's because I used -i without fully understanding what it  \n> implies. Is there any way to checkout a working directory?\n> \n> Thanks in advance for any ideas.\n> -- \n> Jing Xue\n\nSee if \"git reset --hard master\" doesn't check out the files for you.  I\nseem to recall an issue where, after an import, no files were checked\nout.  reset fixed it for me.\n-- \n-Steven Walter <stevenrwalter@gmail.com>\n\"A human being should be able to change a diaper, plan an invasion,\nbutcher a hog, conn a ship, design a building, write a sonnet, balance\naccounts, build a wall, set a bone, comfort the dying, take orders,\ngive orders, cooperate, act alone, solve equations, analyze a new\nproblem, pitch manure, program a computer, cook a tasty meal, fight\nefficiently, die gallantly. Specialization is for insects.\"\n   -Robert Heinlein\n"},{"id":"51272","messageId":"20070822130442.7mioy28ps0sg48sc@intranet.digizenstudio.com","threadId":"9612","inReplyTo":"20070822165846.GA17815@dervierte","subject":"Re: git-svnimport: what to do after -i?","fromName":"Jing Xue","fromEmail":"jingxue@digizenstudio.com","sentAt":"2007-08-22T17:04:42Z","receivedAt":"2007-08-22T17:04:42Z","isPatch":false,"sender":{"key":"jingxue@digizenstudio.com","avatar":null},"body":"\nQuoting Steven Walter <stevenrwalter@gmail.com>:\n\n>\n> See if \"git reset --hard master\" doesn't check out the files for you.  I\n> seem to recall an issue where, after an import, no files were checked\n> out.  reset fixed it for me.\n\nNope...  Tried that and \"git reset --hard HEAD\". Both simply print:\n\nHEAD is now at 7be0678... <the last commit message imported>.\n\nThanks.\n-- \nJing Xue\n"},{"id":"51315","messageId":"20070823012836.GA18796@falcon.digizenstudio.com","threadId":"9612","inReplyTo":"20070822113325.1bihryuk4gko8kgs@intranet.digizenstudio.com","subject":"Re: git-svnimport: what to do after -i?","fromName":"Jing Xue","fromEmail":"jingxue@digizenstudio.com","sentAt":"2007-08-23T01:28:36Z","receivedAt":"2007-08-23T01:28:36Z","isPatch":false,"sender":{"key":"jingxue@digizenstudio.com","avatar":null},"body":"OK, got it working. It had more to do with the module/trunk path than\nthe -i.\n\nMy svn projects are organized like:\nprojectFoo\n    -trunk\n    -tags\n    -branches\n\nSo I initially used:\n\ngit svnimport -C projectFoo -r -A svn-authors -I .gitignore -T projectFoo svn://jabba trunk\n\nwhich resulted in the empty working directory - with or without the -i.\n\nWhat ended up working is this:\n\ngit svnimport -C projectFoo -r -A svn-authors -I .gitignore -T projectFoo -P trunk svn://jabba\n\nCheers.\n-- \nJing Xue\n"},{"id":"51336","messageId":"Pine.LNX.4.64.0708230827440.26254@beast.quantumfyre.co.uk","threadId":"9612","inReplyTo":"20070823012836.GA18796@falcon.digizenstudio.com","subject":"Re: git-svnimport: what to do after -i?","fromName":"Julian Phillips","fromEmail":"julian@quantumfyre.co.uk","sentAt":"2007-08-23T07:29:54Z","receivedAt":"2007-08-23T07:29:54Z","isPatch":false,"sender":{"key":"julian@quantumfyre.co.uk","avatar":"https://avatars.githubusercontent.com/u/948888?v=4"},"body":"On Wed, 22 Aug 2007, Jing Xue wrote:\n\n> OK, got it working. It had more to do with the module/trunk path than\n> the -i.\n>\n> My svn projects are organized like:\n> projectFoo\n>    -trunk\n>    -tags\n>    -branches\n>\n> So I initially used:\n>\n> git svnimport -C projectFoo -r -A svn-authors -I .gitignore -T projectFoo svn://jabba trunk\n>\n> which resulted in the empty working directory - with or without the -i.\n>\n> What ended up working is this:\n>\n> git svnimport -C projectFoo -r -A svn-authors -I .gitignore -T projectFoo -P trunk svn://jabba\n>\n> Cheers.\n\nI haven't used svnimport in a while (and never with subprojects), but you \nseem to be specifying that projectFoo is your trunk - which doesn't seem \nright.\n\nI would have expected the command to be:\n\ngit svnimport -C projectFoo -r -A svn-authors -I .gitignore svn://jabba projectFoo\n\n-- \nJulian\n\n  ---\nEverything you know is wrong!\n"},{"id":"51369","messageId":"20070823130031.GA17092@falcon.digizenstudio.com","threadId":"9612","inReplyTo":"Pine.LNX.4.64.0708230827440.26254@beast.quantumfyre.co.uk","subject":"Re: git-svnimport: what to do after -i?","fromName":"Jing Xue","fromEmail":"jingxue@digizenstudio.com","sentAt":"2007-08-23T13:00:31Z","receivedAt":"2007-08-23T13:00:31Z","isPatch":false,"sender":{"key":"jingxue@digizenstudio.com","avatar":null},"body":"On Thu, Aug 23, 2007 at 08:29:54AM +0100, Julian Phillips wrote:\n> \n> I haven't used svnimport in a while (and never with subprojects), but you \n> seem to be specifying that projectFoo is your trunk - which doesn't seem \n> right.\n> \n> I would have expected the command to be:\n> \n> git svnimport -C projectFoo -r -A svn-authors -I .gitignore svn://jabba \n> projectFoo\n\nThanks for bringing it up. :)\n\nMy svn structure (see my last email) is somewhat reversed from what\nsvnimport assumes, which seems to be more along the lines of:\n\nrepoRoot\n  -trunk\n    -projectFoo\n    -projectBar\n  -tags\n    -projectFoo\n    -projectBar\n  -branches\n    -projectFoo\n    -projectBar\n\nSo in my case I had to kind of cheat svnimport into thinking\n'projectFoo' is the name of the \"trunk\" directory, and 'trunk' is the\nactually project name. And I had to create 'dummytags' and\n'dummybranches' at repoRoot level (following somebody else's tip found\non this list).\n\nOf course doing so has two problems:\n\n1. I can only import one project at one time, but my plan is to have\nseparated git repo for each project going forward, so this works out\njust fine.\n\n2. I can't actually import any tags and branches because my real tags\nand branches are under projectFoo/tags and projectFoo/branches. This is\nsomewhat a loss, but we can cope with it by having the svn repo around\nas the history book.\n\nBut then if there is any better way to achieve this, I would certainly\nbe interested and eager to learn. Thanks.\n\n-- \nJing Xue\n"},{"id":"51412","messageId":"Pine.LNX.4.64.0708240113360.32194@beast.quantumfyre.co.uk","threadId":"9612","inReplyTo":"20070823130031.GA17092@falcon.digizenstudio.com","subject":"Re: git-svnimport: what to do after -i?","fromName":"Julian Phillips","fromEmail":"julian@quantumfyre.co.uk","sentAt":"2007-08-24T00:18:49Z","receivedAt":"2007-08-24T00:18:49Z","isPatch":false,"sender":{"key":"julian@quantumfyre.co.uk","avatar":"https://avatars.githubusercontent.com/u/948888?v=4"},"body":"On Thu, 23 Aug 2007, Jing Xue wrote:\n\n> On Thu, Aug 23, 2007 at 08:29:54AM +0100, Julian Phillips wrote:\n>>\n>> I haven't used svnimport in a while (and never with subprojects), but you\n>> seem to be specifying that projectFoo is your trunk - which doesn't seem\n>> right.\n>>\n>> I would have expected the command to be:\n>>\n>> git svnimport -C projectFoo -r -A svn-authors -I .gitignore svn://jabba\n>> projectFoo\n>\n> Thanks for bringing it up. :)\n>\n> My svn structure (see my last email) is somewhat reversed from what\n> svnimport assumes, which seems to be more along the lines of:\n>\n> repoRoot\n>  -trunk\n>    -projectFoo\n>    -projectBar\n>  -tags\n>    -projectFoo\n>    -projectBar\n>  -branches\n>    -projectFoo\n>    -projectBar\n>\n> So in my case I had to kind of cheat svnimport into thinking\n> 'projectFoo' is the name of the \"trunk\" directory, and 'trunk' is the\n> actually project name. And I had to create 'dummytags' and\n> 'dummybranches' at repoRoot level (following somebody else's tip found\n> on this list).\n\nAh, yes ... sorry.  I've actually ended up using a homebrew script for \nparsing svn dump files and feeding git-fast-import for a number of \nreasons, so I'm a bit rusty with svnimport, and never looked at multiple \nprojects in one repo anyway.  (One of which was that svnimport wasn't \ncreating a correct import actually - some files and directories were \nsimply missing).\n\n> Of course doing so has two problems:\n>\n> 1. I can only import one project at one time, but my plan is to have\n> separated git repo for each project going forward, so this works out\n> just fine.\n>\n> 2. I can't actually import any tags and branches because my real tags\n> and branches are under projectFoo/tags and projectFoo/branches. This is\n> somewhat a loss, but we can cope with it by having the svn repo around\n> as the history book.\n>\n> But then if there is any better way to achieve this, I would certainly\n> be interested and eager to learn. Thanks.\n\nI guess you've tried including projectFoo in the url?  Other than that, \nperhaps git-svn may have better luck?\n\n-- \nJulian\n\n  ---\nI'm not a real movie star -- I've still got the same wife I started out\nwith twenty-eight years ago.\n \t\t-- Will Rogers\n"},{"id":"51416","messageId":"20070824010619.GA18265@falcon.digizenstudio.com","threadId":"9612","inReplyTo":"Pine.LNX.4.64.0708240113360.32194@beast.quantumfyre.co.uk","subject":"Re: git-svnimport: what to do after -i?","fromName":"Jing Xue","fromEmail":"jingxue@digizenstudio.com","sentAt":"2007-08-24T01:06:19Z","receivedAt":"2007-08-24T01:06:19Z","isPatch":false,"sender":{"key":"jingxue@digizenstudio.com","avatar":null},"body":"On Fri, Aug 24, 2007 at 01:18:49AM +0100, Julian Phillips wrote:\n> On Thu, 23 Aug 2007, Jing Xue wrote:\n> \n> >So in my case I had to kind of cheat svnimport into thinking\n> >'projectFoo' is the name of the \"trunk\" directory, and 'trunk' is the\n> >actually project name. And I had to create 'dummytags' and\n> >'dummybranches' at repoRoot level (following somebody else's tip found\n> >on this list).\n> \n> Ah, yes ... sorry.  I've actually ended up using a homebrew script for \n> parsing svn dump files and feeding git-fast-import for a number of \n> reasons, so I'm a bit rusty with svnimport, and never looked at multiple \n> projects in one repo anyway.  (One of which was that svnimport wasn't \n> creating a correct import actually - some files and directories were \n> simply missing).\n\nThat's... not good to hear about. I should probably look at svn dump as\nwell.\n\n> I guess you've tried including projectFoo in the url?  Other than that, \n> perhaps git-svn may have better luck?\n\nI tried that too but decided against it as it's relatively OK to lose\nsome ancient history, but messing up ongoing development due to any\npossible issues in the git-svn layer would be quite different a story.\n(and from what you just mentioned, that's not entirely a paranoia 8-)\n\nThanks.\n-- \nJing\n"}]}