{"thread":{"id":"7192","subject":"How to use git-svnimport without trunk, tags and branches?","startedAt":"2007-03-11T11:38:31Z","lastAt":"2007-03-12T15:10:32Z","messageCount":5,"participants":["Georg Lohrer","Karl Hasselström","pacco@tropezien.de"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"36797","messageId":"45F3EA37.2080502@tropezien.de","threadId":"7192","inReplyTo":null,"subject":"How to use git-svnimport without trunk, tags and branches?","fromName":"Georg Lohrer","fromEmail":"pacco@tropezien.de","sentAt":"2007-03-11T11:38:31Z","receivedAt":"2007-03-11T11:38:31Z","isPatch":false,"sender":{"key":"pacco@tropezien.de","avatar":null},"body":"Hi,\n\nI have searched the archive but did not found any hint for my problem.\nPerhaps I did not have the right search pattern, but see yourself:\n\nThe most important thing prior of using git was to import my subversion\nrepositories. It seems to be quite easy if the SVN-repositories are of\ncommon structure using the trunk, tags and branches structure.\n\nBut times ago I have had the idea of not using the traditional structure\nof subversion for some of my repositories but using the repository\ndirectly as single directory - no trunk, no tags, no branches. That was\nbecause I thought only a geek would have the \"complicated\" way for only\na few files without any need for tags and branches.\nAnd now the git-svnimport does not seem to be able to handle a SVN-repos\nstructure like mine:\n\n~/svnrepos/\n      |------- projectA\n                  |---- foo.cpp\n                  |---- foo.h\n\nI want to import projectA into git _with_ the commit-history (there are\nof course no tags and no branches).\nIs there a way to do that with git-svnimport? Or do I have to throw away\nall the details, checkout projectA and reimport it as initial version\nwith git?\n\nAny hints are warmly appreciated.\n\nCiao, Georg\n"},{"id":"36807","messageId":"20070311143638.GA7822@diana.vm.bytemark.co.uk","threadId":"7192","inReplyTo":"45F3EA37.2080502@tropezien.de","subject":"Re: How to use git-svnimport without trunk, tags and branches?","fromName":"Karl Hasselström","fromEmail":"kha@treskal.com","sentAt":"2007-03-11T14:36:38Z","receivedAt":"2007-03-11T14:36:38Z","isPatch":false,"sender":{"key":"kha@treskal.com","avatar":"https://gravatar.com/avatar/f0120c734b5279b345075a28521e1ac66acb20c9913ffe9bf6ae97e53f7f3f13?d=mp&s=160"},"body":"On 2007-03-11 12:38:31 +0100, Georg Lohrer wrote:\n\n> But times ago I have had the idea of not using the traditional\n> structure of subversion for some of my repositories but using the\n> repository directly as single directory - no trunk, no tags, no\n> branches. That was because I thought only a geek would have the\n> \"complicated\" way for only a few files without any need for tags and\n> branches. And now the git-svnimport does not seem to be able to\n> handle a SVN-repos structure like mine:\n>\n> ~/svnrepos/\n>      |------- projectA\n>                  |---- foo.cpp\n>                  |---- foo.h\n>\n> I want to import projectA into git _with_ the commit-history (there\n> are of course no tags and no branches). Is there a way to do that\n> with git-svnimport? Or do I have to throw away all the details,\n> checkout projectA and reimport it as initial version with git?\n\nYou could try something like this:\n\n  trunk: svnrepos/projectA\n  tags: svnrepos/dummytags\n  branches: svnrepos/dummybranches\n\nI haven't tested, but I think that kind of maneouver should work.\n\n-- \nKarl Hasselström, kha@treskal.com\n      www.treskal.com/kalle\n"},{"id":"36822","messageId":"45F434E9.7040003@tropezien.de","threadId":"7192","inReplyTo":"20070311143638.GA7822@diana.vm.bytemark.co.uk","subject":"Re: How to use git-svnimport without trunk, tags and branches?","fromName":"Georg Lohrer","fromEmail":"pacco@tropezien.de","sentAt":"2007-03-11T16:57:13Z","receivedAt":"2007-03-11T16:57:13Z","isPatch":false,"sender":{"key":"pacco@tropezien.de","avatar":null},"body":"Hi Karl,\n\nKarl Hasselström schrieb:\n  > You could try something like this:\n> \n>   trunk: svnrepos/projectA\n>   tags: svnrepos/dummytags\n>   branches: svnrepos/dummybranches\n> \n> I haven't tested, but I think that kind of maneouver should work.\n\nyes, that does the trick. I use:\n\n$ cd ~/tmp/git-test\n$ tar xvfj fooRepos.tar.bz2\n$ mv fooRepos foorRepos.svnrepos\n$ svn mkdir file:///home/georg/tmp/git-test/fooRepos.svnrepos/dummytags\n$ svn mkdir file:///home/georg/tmp/git-test/foorRepos.svnrepos/dummybranches\n$ mkdir fooRepos.git; cd fooRepos.git\n$ git-svnimport -b dummybranches -t dummytags -T projectA \nfile:///home/georg/tmp/git-test/fooRepos.svnrepos\n\nUnfortunately there was a bunch of directories  instead of a single \nprojectA-directory. Do I have to repeat the above mentioned sequence for \nevery directory (projectA, projectB, ...) or is there a simple way of \ngit-svnimport'ing into an existing git-repository?\n\nNevertheless, if that is not possible, I could extract with your way \nthe desired directories separately and keep the histories intact.\n\nRegards, Georg\n"},{"id":"36854","messageId":"20070311202620.GB15336@diana.vm.bytemark.co.uk","threadId":"7192","inReplyTo":"45F434E9.7040003@tropezien.de","subject":"Re: How to use git-svnimport without trunk, tags and branches?","fromName":"Karl Hasselström","fromEmail":"kha@treskal.com","sentAt":"2007-03-11T20:26:20Z","receivedAt":"2007-03-11T20:26:20Z","isPatch":false,"sender":{"key":"kha@treskal.com","avatar":"https://gravatar.com/avatar/f0120c734b5279b345075a28521e1ac66acb20c9913ffe9bf6ae97e53f7f3f13?d=mp&s=160"},"body":"On 2007-03-11 17:57:13 +0100, Georg Lohrer wrote:\n\n> Karl Hasselström schrieb:\n>\n> > You could try something like this:\n> >\n> >  trunk: svnrepos/projectA\n> >  tags: svnrepos/dummytags\n> >  branches: svnrepos/dummybranches\n>\n> yes, that does the trick. I use:\n>\n> $ cd ~/tmp/git-test\n> $ tar xvfj fooRepos.tar.bz2\n> $ mv fooRepos foorRepos.svnrepos\n> $ svn mkdir file:///home/georg/tmp/git-test/fooRepos.svnrepos/dummytags\n> $ svn mkdir file:///home/georg/tmp/git-test/foorRepos.svnrepos/dummybranches\n> $ mkdir fooRepos.git; cd fooRepos.git\n> $ git-svnimport -b dummybranches -t dummytags -T projectA file:///home/georg/tmp/git-test/fooRepos.svnrepos\n\nDid you try importing without creating the dummy* directories? I think\nit may work even if they don't exist.\n\n> Unfortunately there was a bunch of directories instead of a single\n> projectA-directory. Do I have to repeat the above mentioned sequence\n> for every directory (projectA, projectB, ...) or is there a simple\n> way of git-svnimport'ing into an existing git-repository?\n\nYou could try this:\n\n  trunk: dummy\n  tags: dummy\n  branches: svnrepos\n\nThat should turn svnrepos/projectA into the branch projectA,\nsvnrepos/projectB into the branch projectB, and so on.\n\n-- \nKarl Hasselström, kha@treskal.com\n      www.treskal.com/kalle\n"},{"id":"36913","messageId":"1173712232.45f56d6851a5f@secure.konsole-h.de","threadId":"7192","inReplyTo":"20070311202620.GB15336@diana.vm.bytemark.co.uk","subject":"Re: How to use git-svnimport without trunk, tags and branches?","fromName":"","fromEmail":"pacco@tropezien.de","sentAt":"2007-03-12T15:10:32Z","receivedAt":"2007-03-12T15:10:32Z","isPatch":false,"sender":{"key":"pacco@tropezien.de","avatar":null},"body":"Zitat von Karl Hasselström <kha@treskal.com>:\n\n> You could try this:\n> \n>   trunk: dummy\n>   tags: dummy\n>   branches: svnrepos\n> \nNo, it does not do that. Instead I got a huge amount of errors as with giving no\ndetails at all (passing only the non-standard svn-repository).\n\nBut, I fixed the way around now, by scrutinizing through the history and looking\nfor essential parts. I checkedout the specific versions seperately and rebuild\nthe history by cg-add'ing the file-versions one after the other. The hard way,\nbut there were not many really important files.\n\nSo, thank you a lot for passing me your help.\n\nCiao, Georg\n"}]}