{"thread":{"id":"7796","subject":"speeding up git-svn when directories are copied?","startedAt":"2007-04-23T14:16:01Z","lastAt":"2007-04-26T15:45:12Z","messageCount":4,"participants":["Karl Hasselström","Eric Wong"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"40200","messageId":"20070423141601.GA5797@diana.vm.bytemark.co.uk","threadId":"7796","inReplyTo":null,"subject":"speeding up git-svn when directories are copied?","fromName":"Karl Hasselström","fromEmail":"kha@treskal.com","sentAt":"2007-04-23T14:16:01Z","receivedAt":"2007-04-23T14:16:01Z","isPatch":false,"sender":{"key":"kha@treskal.com","avatar":"https://gravatar.com/avatar/f0120c734b5279b345075a28521e1ac66acb20c9913ffe9bf6ae97e53f7f3f13?d=mp&s=160"},"body":"When importing a whole repository, git-svn currently takes a _lot_ of\ntime. Almost all of it seems to be spent getting the full text of each\nand every file when a tag or new branch is created.\n\nIf I remember correctly (but it was quite a while since I looked at\nit), git-svnimport didn't ask the Subversion server for all the files;\nit just noticed when the server said that a new directory was a copy\nof an old directory, which makes them just as fast as any other commit\nthat doesn't change a gazillion files. (I've had an import running for\na few hours now, and have checked on it about a dozen times; every\nsingle time, it was importing a new tag or branch. This suggests that\nmaking these go as fast as regular commits would speed up the import\nby more than a factor 10.)\n\nHave you looked at doing this with git-svn? If it's not on your to-do\nlist, I might take a stab at it at some point. But I only speak the\ncopy-n-paste dialect of perl, so I'll need to find a largish block of\nuninterrupted time first. :-)\n\n-- \nKarl Hasselström, kha@treskal.com\n      www.treskal.com/kalle\n"},{"id":"40279","messageId":"20070424015405.GA7232@untitled","threadId":"7796","inReplyTo":"20070423141601.GA5797@diana.vm.bytemark.co.uk","subject":"Re: speeding up git-svn when directories are copied?","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2007-04-24T01:54:05Z","receivedAt":"2007-04-24T01:54:05Z","isPatch":false,"sender":{"key":"e@80x24.org","avatar":null},"body":"Karl Hasselström <kha@treskal.com> wrote:\n> When importing a whole repository, git-svn currently takes a _lot_ of\n> time. Almost all of it seems to be spent getting the full text of each\n> and every file when a tag or new branch is created.\n\nTry SVN 1.4.3 with my patch[1] to get do_switch() working.\ntrunk should work without the patch.\n\n[1] - http://svn.haxx.se/dev/archive-2007-01/0936.shtml\n\ndo_switch() is broken otherwise, and do_update() is extremely\ninefficient.\n\n-- \nEric Wong\n"},{"id":"40314","messageId":"20070424100100.GA23811@diana.vm.bytemark.co.uk","threadId":"7796","inReplyTo":"20070424015405.GA7232@untitled","subject":"Re: speeding up git-svn when directories are copied?","fromName":"Karl Hasselström","fromEmail":"kha@treskal.com","sentAt":"2007-04-24T10:01:00Z","receivedAt":"2007-04-24T10:01:00Z","isPatch":false,"sender":{"key":"kha@treskal.com","avatar":"https://gravatar.com/avatar/f0120c734b5279b345075a28521e1ac66acb20c9913ffe9bf6ae97e53f7f3f13?d=mp&s=160"},"body":"On 2007-04-23 18:54:05 -0700, Eric Wong wrote:\n\n> Karl Hasselström <kha@treskal.com> wrote:\n>\n> > When importing a whole repository, git-svn currently takes a _lot_\n> > of time. Almost all of it seems to be spent getting the full text\n> > of each and every file when a tag or new branch is created.\n>\n> Try SVN 1.4.3 with my patch[1] to get do_switch() working. trunk\n> should work without the patch.\n>\n> [1] - http://svn.haxx.se/dev/archive-2007-01/0936.shtml\n>\n> do_switch() is broken otherwise, and do_update() is extremely\n> inefficient.\n\nThanks for the help. I applied your patch to a clean 1.4.3 tree, and\nbuilt subversion itself plus the perl bindings. But git-svn is still\nslow, and the testcase you gave in that thread still fails.\n\n(I'm pretty sure that I'm actually using the bindings I've built; I\ninstall them to a nonstandard location, so if I don't set PERL5LIB\nthey aren't found at all, and perl complains. When I do set it to my\npatched bindings, perl accepts it but your testcase fails.)\n\n-- \nKarl Hasselström, kha@treskal.com\n      www.treskal.com/kalle\n"},{"id":"40516","messageId":"20070426154512.GA29248@muzzle","threadId":"7796","inReplyTo":"20070424100100.GA23811@diana.vm.bytemark.co.uk","subject":"Re: speeding up git-svn when directories are copied?","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2007-04-26T15:45:12Z","receivedAt":"2007-04-26T15:45:12Z","isPatch":false,"sender":{"key":"e@80x24.org","avatar":null},"body":"Karl Hasselström <kha@treskal.com> wrote:\n> On 2007-04-23 18:54:05 -0700, Eric Wong wrote:\n> \n> > Karl Hasselström <kha@treskal.com> wrote:\n> >\n> > > When importing a whole repository, git-svn currently takes a _lot_\n> > > of time. Almost all of it seems to be spent getting the full text\n> > > of each and every file when a tag or new branch is created.\n> >\n> > Try SVN 1.4.3 with my patch[1] to get do_switch() working. trunk\n> > should work without the patch.\n> >\n> > [1] - http://svn.haxx.se/dev/archive-2007-01/0936.shtml\n> >\n> > do_switch() is broken otherwise, and do_update() is extremely\n> > inefficient.\n> \n> Thanks for the help. I applied your patch to a clean 1.4.3 tree, and\n> built subversion itself plus the perl bindings. But git-svn is still\n> slow, and the testcase you gave in that thread still fails.\n> \n> (I'm pretty sure that I'm actually using the bindings I've built; I\n> install them to a nonstandard location, so if I don't set PERL5LIB\n> they aren't found at all, and perl complains. When I do set it to my\n> patched bindings, perl accepts it but your testcase fails.)\n\nHmm... I've been using 1.4.3 + patch since January on at least\none of my machines and do_switch() has worked correctly every time.\n\ngit-svn will display a message telling you that it's using do_switch()\nwhen following a branch.  Otherwise, it'll say it's using do_update().\n\n-- \nEric Wong\n"}]}