{"thread":{"id":"27891","subject":"submodule add does not consider git svn","startedAt":"2011-07-23T03:33:05Z","lastAt":"2011-07-24T19:44:39Z","messageCount":4,"participants":["rupert THURNER","Jens Lehmann"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"171877","messageId":"CAJs9aZ9cMZd5PfOW7Zfza3un5JqKRM5eQdDpKPCWvLn-vkzktA@mail.gmail.com","threadId":"27891","inReplyTo":null,"subject":"submodule add does not consider git svn","fromName":"rupert THURNER","fromEmail":"rupert.thurner@gmail.com","sentAt":"2011-07-23T03:33:05Z","receivedAt":"2011-07-23T03:33:05Z","isPatch":false,"sender":{"key":"rupert.thurner@gmail.com","avatar":null},"body":"it seems that \"git submodule add\" looses information from \"git svn\nclone\". what am i missing here which would allow to \"git svn rebase\"\nthe repository, even if it is newly added as submodule?\n\nthe following example takes a little, as the repository has 15'000\nrevisions, even 99% do not concern the checked out part.\n\nrupert @ login : ~/tmp/subm-bug\n mkdir -p  ~/tmp/subm-bug\n cd ~/tmp/subm-bug\n git svn clone https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/pkg/GeoIP/trunk\nGeoIP\n git init test\n cd test\n git submodule add ~/tmp/subm-bug/GeoIP\n cd GeoIP\n git svn rebase\n\nMigrating from a git-svn v1 layout...\nData from a previous version of git-svn exists, but\n        .git/svn\n        (required for this version (1.7.5.4) of git-svn) does not exist.\nDone migrating from a git-svn v1 layout\nUnable to determine upstream SVN information from working tree history\n"},{"id":"171896","messageId":"4E2B10B7.3010903@web.de","threadId":"27891","inReplyTo":"CAJs9aZ9cMZd5PfOW7Zfza3un5JqKRM5eQdDpKPCWvLn-vkzktA@mail.gmail.com","subject":"Re: submodule add does not consider git svn","fromName":"Jens Lehmann","fromEmail":"jens.lehmann@web.de","sentAt":"2011-07-23T18:19:35Z","receivedAt":"2011-07-23T18:19:35Z","isPatch":false,"sender":{"key":"jens.lehmann@web.de","avatar":"https://avatars.githubusercontent.com/u/135220?v=4"},"body":"Am 23.07.2011 05:33, schrieb rupert THURNER:\n> it seems that \"git submodule add\" looses information from \"git svn\n> clone\". what am i missing here which would allow to \"git svn rebase\"\n> the repository, even if it is newly added as submodule?\n>\n> the following example takes a little, as the repository has 15'000\n> revisions, even 99% do not concern the checked out part.\n> \n> rupert @ login : ~/tmp/subm-bug\n>  mkdir -p  ~/tmp/subm-bug\n>  cd ~/tmp/subm-bug\n>  git svn clone https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/pkg/GeoIP/trunk\n> GeoIP\n>  git init test\n>  cd test\n>  git submodule add ~/tmp/subm-bug/GeoIP\n>  cd GeoIP\n>  git svn rebase\n> \n> Migrating from a git-svn v1 layout...\n> Data from a previous version of git-svn exists, but\n>         .git/svn\n>         (required for this version (1.7.5.4) of git-svn) does not exist.\n> Done migrating from a git-svn v1 layout\n> Unable to determine upstream SVN information from working tree history\n\nThat is because in your example \"git submodule add\" clones that repo\n*again* from where you put it using \"git svn clone\". I am not really\nfamiliar with git svn, but I assume it is intended that when you clone\nsuch a repo it \"forgets\" that it was connected with a svn repo. Try the\nfollowing instead:\n\ngit init test\ncd test\ngit svn clone https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/pkg/GeoIP/trunk GeoIP\ngit submodule add ./GeoIP      # Add existing git svn repo GeoIP in place\ncd GeoIP\ngit svn rebase\n\nOf course when you push that submodule somewhere else using git I expect\nthat \"git svn rebase\" won't work when you clone that somewhere else, just\nlike it happened in your example.\n"},{"id":"171927","messageId":"CAJs9aZ8fAPzr6Lo1EUO+Lnr1pHm=dNr6P5oYgpXE1RqkmMX7hA@mail.gmail.com","threadId":"27891","inReplyTo":"4E2B10B7.3010903@web.de","subject":"Re: submodule add does not consider git svn","fromName":"rupert THURNER","fromEmail":"rupert.thurner@gmail.com","sentAt":"2011-07-24T08:00:29Z","receivedAt":"2011-07-24T08:00:29Z","isPatch":false,"sender":{"key":"rupert.thurner@gmail.com","avatar":null},"body":"On Sat, Jul 23, 2011 at 20:19, Jens Lehmann <Jens.Lehmann@web.de> wrote:\n>\n> Am 23.07.2011 05:33, schrieb rupert THURNER:\n> > it seems that \"git submodule add\" looses information from \"git svn\n> > clone\". what am i missing here which would allow to \"git svn rebase\"\n> > the repository, even if it is newly added as submodule?\n> >\n> > the following example takes a little, as the repository has 15'000\n> > revisions, even 99% do not concern the checked out part.\n> >\n> > rupert @ login : ~/tmp/subm-bug\n> >  mkdir -p  ~/tmp/subm-bug\n> >  cd ~/tmp/subm-bug\n> >  git svn clone https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/pkg/GeoIP/trunk\n> > GeoIP\n> >  git init test\n> >  cd test\n> >  git submodule add ~/tmp/subm-bug/GeoIP\n> >  cd GeoIP\n> >  git svn rebase\n> >\n> > Migrating from a git-svn v1 layout...\n> > Data from a previous version of git-svn exists, but\n> >         .git/svn\n> >         (required for this version (1.7.5.4) of git-svn) does not exist.\n> > Done migrating from a git-svn v1 layout\n> > Unable to determine upstream SVN information from working tree history\n>\n> That is because in your example \"git submodule add\" clones that repo\n> *again* from where you put it using \"git svn clone\". I am not really\n> familiar with git svn, but I assume it is intended that when you clone\n> such a repo it \"forgets\" that it was connected with a svn repo. Try the\n> following instead:\n>\n> git init test\n> cd test\n> git svn clone https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/pkg/GeoIP/trunk GeoIP\n> git submodule add ./GeoIP      # Add existing git svn repo GeoIP in place\n> cd GeoIP\n> git svn rebase\n>\n> Of course when you push that submodule somewhere else using git I expect\n> that \"git svn rebase\" won't work when you clone that somewhere else, just\n> like it happened in your example.\n\nhow would the standard git case work, to continue with the example above:\n  git clone test test1\n  git clone test1 test2\n\nif then sombody changes test, and i want to get these changes into\ntest2, without involving test1, and rebase what is there?\n\nrupert\n"},{"id":"171969","messageId":"4E2C7627.8050104@web.de","threadId":"27891","inReplyTo":"CAJs9aZ8fAPzr6Lo1EUO+Lnr1pHm=dNr6P5oYgpXE1RqkmMX7hA@mail.gmail.com","subject":"Re: submodule add does not consider git svn","fromName":"Jens Lehmann","fromEmail":"jens.lehmann@web.de","sentAt":"2011-07-24T19:44:39Z","receivedAt":"2011-07-24T19:44:39Z","isPatch":false,"sender":{"key":"jens.lehmann@web.de","avatar":"https://avatars.githubusercontent.com/u/135220?v=4"},"body":"Am 24.07.2011 10:00, schrieb rupert THURNER:\n> On Sat, Jul 23, 2011 at 20:19, Jens Lehmann <Jens.Lehmann@web.de> wrote:\n>> Try the following instead:\n>>\n>> git init test\n>> cd test\n>> git svn clone https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/pkg/GeoIP/trunk GeoIP\n>> git submodule add ./GeoIP      # Add existing git svn repo GeoIP in place\n>> cd GeoIP\n>> git svn rebase\n>>\n>> Of course when you push that submodule somewhere else using git I expect\n>> that \"git svn rebase\" won't work when you clone that somewhere else, just\n>> like it happened in your example.\n> \n> how would the standard git case work, to continue with the example above:\n>   git clone test test1\n>   git clone test1 test2\n\nI don't think you should clone \"test\" directly, but rather push that to\na bare repo or git server so others can clone from there. And as the\nGeoIP submodule is its own git repo, it has to have someplace to be\npushed to too. That url must be configured in the .gitmodules file and\nyou have to call \"git submodule sync\" before you commit and push the \"test\"\nsuperproject and push the GeoIP submodule so others can use \"git submodule\ninit\" and \"git submodule update\" in their \"test\" clone to get the submodule\ntoo.\n\nThe \"test\" repo you set up with \"git svn clone\" could be where you integrate\nchanges coming from svn (git svn people please stop me if this is rubbish,\nI'm just making assumptions here!) which are then pushed to the shared git\nrepo so your coworkers can fetch it from there.\n\n> if then sombody changes test, and i want to get these changes into\n> test2, without involving test1, and rebase what is there?\n\nI'm not sure I understand what you mean here. But you can control what to\ncheck out using different branches for different purposes.\n"}]}