{"thread":{"id":"20969","subject":"git-svn-problem: Unnecessary downloading entire branch?","startedAt":"2009-09-16T11:53:59Z","lastAt":"2009-09-23T06:55:13Z","messageCount":2,"participants":["Martin Larsson","Eric Wong"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"123341","messageId":"1253102039.6509.143.camel@martin","threadId":"20969","inReplyTo":null,"subject":"git-svn-problem: Unnecessary downloading entire branch?","fromName":"Martin Larsson","fromEmail":"martin.liste.larsson@gmail.com","sentAt":"2009-09-16T11:53:59Z","receivedAt":"2009-09-16T11:53:59Z","isPatch":false,"sender":{"key":"martin.liste.larsson@gmail.com","avatar":null},"body":"I have a local git-copy of the company svn-repository. The git-copy is\nup-to-date (git svn fetch). I then add a new branch in the\nsvn-repository (svn cp http://.../trunk http://...branches/JIRA-4444).\nWhen I then do 'git svn fetch' again, it pulls all the files from the\nsvn-repository. \n\nI was expecting it to only pull the fact that a new branch was made\n(taking milliseconds), not all the files in the branch (taking more than\nhalf an hour to complete). Why does it need to transfer all the files?\n\nI did have problems getting the original svn-repository. It took several\ndays and stopped several times in the process. Each time it stopped, I\njust issued 'git svn fetch' again and it seemed to continue. Could this\nbe related? How could I make a better copy?\n\nM.\n"},{"id":"123662","messageId":"20090923065513.GA18490@dcvr.yhbt.net","threadId":"20969","inReplyTo":"1253102039.6509.143.camel@martin","subject":"Re: git-svn-problem: Unnecessary downloading entire branch?","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2009-09-23T06:55:13Z","receivedAt":"2009-09-23T06:55:13Z","isPatch":false,"sender":{"key":"e@80x24.org","avatar":null},"body":"Martin Larsson <martin.liste.larsson@gmail.com> wrote:\n> I have a local git-copy of the company svn-repository. The git-copy is\n> up-to-date (git svn fetch). I then add a new branch in the\n> svn-repository (svn cp http://.../trunk http://...branches/JIRA-4444).\n> When I then do 'git svn fetch' again, it pulls all the files from the\n> svn-repository. \n> \n> I was expecting it to only pull the fact that a new branch was made\n> (taking milliseconds), not all the files in the branch (taking more than\n> half an hour to complete). Why does it need to transfer all the files?\n\nAre some branches at a different depth in the repository?  E.g:\n\n\tproject/trunk\n\tproject/branches/feature-a\n\tproject/branches/martin/feature-b\n\tproject/branches/martin/feature-c\n\tproject/branches/feature-d\n\tproject/branches/feature-e\n\nBasically a refs layout like this in your $GIT_CONFIG:\n\n\tfetch = project/trunk:refs/remotes/trunk\n\tbranches = project/branches/*:refs/remotes/*\n\nIs going to get git svn confused and think \"martin\" is a branch when\nit is rather a container of a branch.\n\n\nHowever if you have a consistent depth and two branch containers\n(\"martin\" and his evil twin, \"nitram\"):\n\n\tproject/trunk\n\tproject/branches/martin/feature-b\n\tproject/branches/martin/feature-c\n\tproject/branches/nitram/feature-a\n\tproject/branches/nitram/feature-d\n\tproject/branches/nitram/feature-e\n\n\nAs of git v1.6.4, you can repeat \"branches\" or \"tags\" lines in\n$GIT_CONFIG thanks to Marc Branchaud:\n\n\tfetch = project/trunk:refs/remotes/trunk\n\tbranches = project/branches/martin/*:refs/remotes/martin/*\n\tbranches = project/branches/nitram/*:refs/remotes/nitram/*\n\nThis is a known problem with the (extremely flexible and therefore\ninconsistent) way SVN repositories can be laid out.\n\n> I did have problems getting the original svn-repository. It took several\n> days and stopped several times in the process. Each time it stopped, I\n> just issued 'git svn fetch' again and it seemed to continue. Could this\n> be related? How could I make a better copy?\n\nIt could be the server disconnecting you or a bad Internet connection.\nResuming \"git svn fetch\" should be perfectly safe, though.\n\n-- \nEric Wong\n"}]}