* git-svnimport: what to do after -i? @ 2007-08-22 15:33 Jing Xue 2007-08-22 16:58 ` Steven Walter 2007-08-23 1:28 ` Jing Xue 0 siblings, 2 replies; 8+ messages in thread From: Jing Xue @ 2007-08-22 15:33 UTC (permalink / raw) To: git I am new to git. Last night I used "git svnimport -i" to import a svn project. It finished successfully. The only problem now is I can't seem to be able to checkout a working copy. In other words, I have a 'projectFoo' directory, with only .git in it, but not any actual working files. "git-branch" shows two branches, master and origin. "git-checkout master" returns successfully, but does nothing. I guess that's because I used -i without fully understanding what it implies. Is there any way to checkout a working directory? Thanks in advance for any ideas. -- Jing Xue ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: git-svnimport: what to do after -i? 2007-08-22 15:33 git-svnimport: what to do after -i? Jing Xue @ 2007-08-22 16:58 ` Steven Walter 2007-08-22 17:04 ` Jing Xue 2007-08-23 1:28 ` Jing Xue 1 sibling, 1 reply; 8+ messages in thread From: Steven Walter @ 2007-08-22 16:58 UTC (permalink / raw) To: Jing Xue; +Cc: git On Wed, Aug 22, 2007 at 11:33:25AM -0400, Jing Xue wrote: > > I am new to git. Last night I used "git svnimport -i" to import a svn > project. It finished successfully. The only problem now is I can't > seem to be able to checkout a working copy. In other words, I have a > 'projectFoo' directory, with only .git in it, but not any actual > working files. "git-branch" shows two branches, master and origin. > "git-checkout master" returns successfully, but does nothing. > > I guess that's because I used -i without fully understanding what it > implies. Is there any way to checkout a working directory? > > Thanks in advance for any ideas. > -- > Jing Xue See if "git reset --hard master" doesn't check out the files for you. I seem to recall an issue where, after an import, no files were checked out. reset fixed it for me. -- -Steven Walter <stevenrwalter@gmail.com> "A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects." -Robert Heinlein ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: git-svnimport: what to do after -i? 2007-08-22 16:58 ` Steven Walter @ 2007-08-22 17:04 ` Jing Xue 0 siblings, 0 replies; 8+ messages in thread From: Jing Xue @ 2007-08-22 17:04 UTC (permalink / raw) To: Steven Walter; +Cc: git Quoting Steven Walter <stevenrwalter@gmail.com>: > > See if "git reset --hard master" doesn't check out the files for you. I > seem to recall an issue where, after an import, no files were checked > out. reset fixed it for me. Nope... Tried that and "git reset --hard HEAD". Both simply print: HEAD is now at 7be0678... <the last commit message imported>. Thanks. -- Jing Xue ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: git-svnimport: what to do after -i? 2007-08-22 15:33 git-svnimport: what to do after -i? Jing Xue 2007-08-22 16:58 ` Steven Walter @ 2007-08-23 1:28 ` Jing Xue 2007-08-23 7:29 ` Julian Phillips 1 sibling, 1 reply; 8+ messages in thread From: Jing Xue @ 2007-08-23 1:28 UTC (permalink / raw) To: git OK, got it working. It had more to do with the module/trunk path than the -i. My svn projects are organized like: projectFoo -trunk -tags -branches So I initially used: git svnimport -C projectFoo -r -A svn-authors -I .gitignore -T projectFoo svn://jabba trunk which resulted in the empty working directory - with or without the -i. What ended up working is this: git svnimport -C projectFoo -r -A svn-authors -I .gitignore -T projectFoo -P trunk svn://jabba Cheers. -- Jing Xue ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: git-svnimport: what to do after -i? 2007-08-23 1:28 ` Jing Xue @ 2007-08-23 7:29 ` Julian Phillips 2007-08-23 13:00 ` Jing Xue 0 siblings, 1 reply; 8+ messages in thread From: Julian Phillips @ 2007-08-23 7:29 UTC (permalink / raw) To: Jing Xue; +Cc: git On Wed, 22 Aug 2007, Jing Xue wrote: > OK, got it working. It had more to do with the module/trunk path than > the -i. > > My svn projects are organized like: > projectFoo > -trunk > -tags > -branches > > So I initially used: > > git svnimport -C projectFoo -r -A svn-authors -I .gitignore -T projectFoo svn://jabba trunk > > which resulted in the empty working directory - with or without the -i. > > What ended up working is this: > > git svnimport -C projectFoo -r -A svn-authors -I .gitignore -T projectFoo -P trunk svn://jabba > > Cheers. I haven't used svnimport in a while (and never with subprojects), but you seem to be specifying that projectFoo is your trunk - which doesn't seem right. I would have expected the command to be: git svnimport -C projectFoo -r -A svn-authors -I .gitignore svn://jabba projectFoo -- Julian --- Everything you know is wrong! ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: git-svnimport: what to do after -i? 2007-08-23 7:29 ` Julian Phillips @ 2007-08-23 13:00 ` Jing Xue 2007-08-24 0:18 ` Julian Phillips 0 siblings, 1 reply; 8+ messages in thread From: Jing Xue @ 2007-08-23 13:00 UTC (permalink / raw) To: Julian Phillips; +Cc: git On Thu, Aug 23, 2007 at 08:29:54AM +0100, Julian Phillips wrote: > > I haven't used svnimport in a while (and never with subprojects), but you > seem to be specifying that projectFoo is your trunk - which doesn't seem > right. > > I would have expected the command to be: > > git svnimport -C projectFoo -r -A svn-authors -I .gitignore svn://jabba > projectFoo Thanks for bringing it up. :) My svn structure (see my last email) is somewhat reversed from what svnimport assumes, which seems to be more along the lines of: repoRoot -trunk -projectFoo -projectBar -tags -projectFoo -projectBar -branches -projectFoo -projectBar So in my case I had to kind of cheat svnimport into thinking 'projectFoo' is the name of the "trunk" directory, and 'trunk' is the actually project name. And I had to create 'dummytags' and 'dummybranches' at repoRoot level (following somebody else's tip found on this list). Of course doing so has two problems: 1. I can only import one project at one time, but my plan is to have separated git repo for each project going forward, so this works out just fine. 2. I can't actually import any tags and branches because my real tags and branches are under projectFoo/tags and projectFoo/branches. This is somewhat a loss, but we can cope with it by having the svn repo around as the history book. But then if there is any better way to achieve this, I would certainly be interested and eager to learn. Thanks. -- Jing Xue ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: git-svnimport: what to do after -i? 2007-08-23 13:00 ` Jing Xue @ 2007-08-24 0:18 ` Julian Phillips 2007-08-24 1:06 ` Jing Xue 0 siblings, 1 reply; 8+ messages in thread From: Julian Phillips @ 2007-08-24 0:18 UTC (permalink / raw) To: Jing Xue; +Cc: git On Thu, 23 Aug 2007, Jing Xue wrote: > On Thu, Aug 23, 2007 at 08:29:54AM +0100, Julian Phillips wrote: >> >> I haven't used svnimport in a while (and never with subprojects), but you >> seem to be specifying that projectFoo is your trunk - which doesn't seem >> right. >> >> I would have expected the command to be: >> >> git svnimport -C projectFoo -r -A svn-authors -I .gitignore svn://jabba >> projectFoo > > Thanks for bringing it up. :) > > My svn structure (see my last email) is somewhat reversed from what > svnimport assumes, which seems to be more along the lines of: > > repoRoot > -trunk > -projectFoo > -projectBar > -tags > -projectFoo > -projectBar > -branches > -projectFoo > -projectBar > > So in my case I had to kind of cheat svnimport into thinking > 'projectFoo' is the name of the "trunk" directory, and 'trunk' is the > actually project name. And I had to create 'dummytags' and > 'dummybranches' at repoRoot level (following somebody else's tip found > on this list). Ah, yes ... sorry. I've actually ended up using a homebrew script for parsing svn dump files and feeding git-fast-import for a number of reasons, so I'm a bit rusty with svnimport, and never looked at multiple projects in one repo anyway. (One of which was that svnimport wasn't creating a correct import actually - some files and directories were simply missing). > Of course doing so has two problems: > > 1. I can only import one project at one time, but my plan is to have > separated git repo for each project going forward, so this works out > just fine. > > 2. I can't actually import any tags and branches because my real tags > and branches are under projectFoo/tags and projectFoo/branches. This is > somewhat a loss, but we can cope with it by having the svn repo around > as the history book. > > But then if there is any better way to achieve this, I would certainly > be interested and eager to learn. Thanks. I guess you've tried including projectFoo in the url? Other than that, perhaps git-svn may have better luck? -- Julian --- I'm not a real movie star -- I've still got the same wife I started out with twenty-eight years ago. -- Will Rogers ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: git-svnimport: what to do after -i? 2007-08-24 0:18 ` Julian Phillips @ 2007-08-24 1:06 ` Jing Xue 0 siblings, 0 replies; 8+ messages in thread From: Jing Xue @ 2007-08-24 1:06 UTC (permalink / raw) To: Julian Phillips; +Cc: git On Fri, Aug 24, 2007 at 01:18:49AM +0100, Julian Phillips wrote: > On Thu, 23 Aug 2007, Jing Xue wrote: > > >So in my case I had to kind of cheat svnimport into thinking > >'projectFoo' is the name of the "trunk" directory, and 'trunk' is the > >actually project name. And I had to create 'dummytags' and > >'dummybranches' at repoRoot level (following somebody else's tip found > >on this list). > > Ah, yes ... sorry. I've actually ended up using a homebrew script for > parsing svn dump files and feeding git-fast-import for a number of > reasons, so I'm a bit rusty with svnimport, and never looked at multiple > projects in one repo anyway. (One of which was that svnimport wasn't > creating a correct import actually - some files and directories were > simply missing). That's... not good to hear about. I should probably look at svn dump as well. > I guess you've tried including projectFoo in the url? Other than that, > perhaps git-svn may have better luck? I tried that too but decided against it as it's relatively OK to lose some ancient history, but messing up ongoing development due to any possible issues in the git-svn layer would be quite different a story. (and from what you just mentioned, that's not entirely a paranoia 8-) Thanks. -- Jing ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2007-08-24 1:06 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2007-08-22 15:33 git-svnimport: what to do after -i? Jing Xue 2007-08-22 16:58 ` Steven Walter 2007-08-22 17:04 ` Jing Xue 2007-08-23 1:28 ` Jing Xue 2007-08-23 7:29 ` Julian Phillips 2007-08-23 13:00 ` Jing Xue 2007-08-24 0:18 ` Julian Phillips 2007-08-24 1:06 ` Jing Xue
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).