{"thread":{"id":"33950","subject":"git-svn too slow, contacts upstream svn repo","startedAt":"2013-05-27T15:25:59Z","lastAt":"2013-05-28T15:20:59Z","messageCount":4,"participants":["Quark","Konstantin Khomoutov"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"218612","messageId":"1369668359.69324.YahooMailNeo@web190701.mail.sg3.yahoo.com","threadId":"33950","inReplyTo":null,"subject":"git-svn too slow, contacts upstream svn repo","fromName":"Quark","fromEmail":"unixuser2000-fbsd@yahoo.com","sentAt":"2013-05-27T15:25:59Z","receivedAt":"2013-05-27T15:25:59Z","isPatch":false,"sender":{"key":"unixuser2000-fbsd@yahoo.com","avatar":null},"body":"hello list,\n\nI have been using git-svn in an corporate environment where svn repo has lot of branches, (lot means > 100). To avoid cloning all branches my config looks as below\n\n[svn-remote \"svn\"]\n        url = svn+ssh://url\n        fetch = srcroot/trunk:refs/remotes/trunk\n        branches = srcroot/branches/{branch_1, branch_2, branch_3}:refs/remotes/*\n\nNow, when a new branch of my interest is added in svn repo, I had like it to be in my git-repo as well. In an ideal world, one shall simply add that branch name to list in curly braces above, but that does not work. I had love to be proved wrong here. Somebody on stackoverflow.com suggested (to else's question, not mine) to add one more \"fetch\" as show below.\n\n[svn-remote \"svn\"]\n        url = svn+ssh://url\n        fetch = srcroot/trunk:refs/remotes/trunk\n        fetch = srcroot/branch_4:refs/remotes/* # NEW BRANCH\n        branches = srcroot/branches/{branch_1, branch_2, branch_3}:refs/remotes/*\n\nhaven't tried it, neither do I like it.\n\nI do have a solution which WORKS, it is modified version of an example from \\doc\\git\\html\\git-svn.html page. Below I have pasted the example and modified it to reflect my specifics.\n\n# assume an existing git-svn repo\n        D:\\sourcecode\n# Clone locally - make sure the refs/remotes/ space matches the server\n        mkdir project\n        cd project\n        git init\n        git remote add origin file:///D:/sourcecode # file:// is delibrate, want true n/w behaviour\n        git config --replace-all remote.origin.fetch '+refs/remotes/*:refs/remotes/*'\n        git fetch\n# Prevent fetch/pull from local git repo,\n# we only want to use git svn for form here\n       git config --remove-section remote.origin\n# Create a local branch from one of the branches just fetched\n        git checkout -b master FETCH_HEAD\n# Initialize 'git svn' locally (be sure to use the same URL and -T/-b/-t options as were used on server)\n        git svn init http://svn.example.com/project\n\n# edit config to include newly added branch in curly braces\n# Pull the latest changes from Subversion\n        git svn fetch -r <recentish rev, say BEGIN>:HEAD\n\nAbove works exactly as I want, except the last step of \"git-svn fetch\" connects to svn repo for each revision from BEGIN to HEAD. I want fairly long history (for pretty blame). Which implies my BEGIN is not so recentish adterall. Hence, it takes awfully long to finish, 2 days typically.\n\nWhen GIT_TRACE is 1, below is output received\n\ntrace: exec: 'git-svn' 'fetch'\ntrace: run_command: 'git-svn' 'fetch'\ntrace: built-in: git 'config' '--bool' '--get' 'svn.fetchall'\ntrace: built-in: git 'config' '--bool' '--get' 'svn.parent'\ntrace: built-in: git 'config' '--bool' '--get' 'svn.noauthcache'\ntrace: built-in: git 'config' '--get' 'svn.revision'\ntrace: built-in: git 'config' '--bool' '--get' 'svn.nocheckout'\ntrace: built-in: git 'config' '--get' 'svn.authorsprog'\ntrace: built-in: git 'config' '--bool' '--get' 'svn.followparent'\ntrace: built-in: git 'config' '--get' 'svn.authorsfile'\ntrace: built-in: git 'config' '--bool' '--get' 'svn.useSvmProps'\ntrace: built-in: git 'config' '--get' 'svn.username'\ntrace: built-in: git 'config' '--get' 'svn.repackflags'\ntrace: built-in: git 'config' '--bool' '--get' 'svn.localtime'\ntrace: built-in: git 'config' '--int' '--get' 'svn.repack'\ntrace: built-in: git 'config' '--get' 'svn.ignorepaths'\ntrace: built-in: git 'config' '--int' '--get' 'svn.logwindowsize'\ntrace: built-in: git 'config' '--bool' '--get' 'svn.quiet'\ntrace: built-in: git 'config' '--get' 'svn.ignorerefs'\ntrace: built-in: git 'config' '--get' 'svn.configdir'\ntrace: built-in: git 'config' '--bool' '--get' 'svn.addauthorfrom'\ntrace: built-in: git 'config' '--bool' '--get' 'svn.useSvnsyncProps'\ntrace: built-in: git 'config' '--bool' '--get' 'svn.noMetadata'\ntrace: built-in: git 'config' '--bool' '--get' 'svn.uselogauthor'\ntrace: built-in: git 'rev-parse' '--symbolic' '--all'\ntrace: built-in: git 'config' '-l'\ntrace: built-in: git 'config' '-l'\ntrace: built-in: git 'config' '--bool' 'svn.useSvmProps'\ntrace: built-in: git 'config' '-l'\ntrace: built-in: git 'config' 'svn-remote.svn.branches-maxRev' '524908'\ntrace: built-in: git 'rev-list' '--pretty=raw' '--reverse' '9f1414be94ab007b62ace31bf4d210a069276127..refs/remotes/branch_1' '--'\ntrace: built-in: git 'rev-list' '--pretty=raw' '--reverse' '5eb0a454bcf066a8199b851add9ec07cde80119d..refs/remotes/branch_2' '--'\ntrace: built-in: git 'rev-list' '--pretty=raw' '--reverse' '383b68b8514010a71efe10821e5ccc3541903ceb..refs/remotes/branch_3' '--'\ntrace: built-in: git 'rev-list' '--pretty=raw' '--reverse' '89fe1a1d2cfca0886003f043c408fb5afadfec93..refs/remotes/trunk' '--'\n\nI keep an watch for \"svn-remote.svn.branches-maxRev\", this serves as my progress. This wait is too much for a simple branch. Though, I must point out, day feels fresh once it finishes :) Does any one know any for this?\n\nIf you paid attention this is Windows machine\ngit version 1.8.1.msysgit.1\n\n\nthanks,\nQuark\n"},{"id":"218633","messageId":"1369726977.1915.YahooMailNeo@web190701.mail.sg3.yahoo.com","threadId":"33950","inReplyTo":"1369668359.69324.YahooMailNeo@web190701.mail.sg3.yahoo.com","subject":"Re: git-svn too slow, contacts upstream svn repo","fromName":"Quark","fromEmail":"unixuser2000-fbsd@yahoo.com","sentAt":"2013-05-28T07:42:57Z","receivedAt":"2013-05-28T07:42:57Z","isPatch":false,"sender":{"key":"unixuser2000-fbsd@yahoo.com","avatar":null},"body":"\n\n----- Original Message -----\n> From: Quark <unixuser2000-fbsd@yahoo.com>\n> To: Git List <git@vger.kernel.org>\n> Cc: \n> Sent: Monday, 27 May 2013 8:55 PM\n> Subject: git-svn too slow, contacts upstream svn repo\n> \n> hello list,\n> \n> I have been using git-svn in an corporate environment where svn repo has lot of \n> branches, (lot means > 100). To avoid cloning all branches my config looks as \n> below\n> \n> [svn-remote \"svn\"]\n>         url = svn+ssh://url\n>         fetch = srcroot/trunk:refs/remotes/trunk\n>         branches = srcroot/branches/{branch_1, branch_2, \n> branch_3}:refs/remotes/*\n> \n> Now, when a new branch of my interest is added in svn repo, I had like it to be \n> in my git-repo as well. In an ideal world, one shall simply add that branch name \n> to list in curly braces above, but that does not work. I had love to be proved \n> wrong here. Somebody on stackoverflow.com suggested (to else's question, not \n> mine) to add one more \"fetch\" as show below.\n> \n> [svn-remote \"svn\"]\n>         url = svn+ssh://url\n>         fetch = srcroot/trunk:refs/remotes/trunk\n>         fetch = srcroot/branch_4:refs/remotes/* # NEW BRANCH\n>         branches = srcroot/branches/{branch_1, branch_2, \n> branch_3}:refs/remotes/*\n> \n> haven't tried it, neither do I like it.\n> \n> I do have a solution which WORKS, it is modified version of an example from \n> \\doc\\git\\html\\git-svn.html page. Below I have pasted the example \n> and modified it to reflect my specifics.\n> \n> # assume an existing git-svn repo\n>         D:\\sourcecode\n> # Clone locally - make sure the refs/remotes/ space matches the server\n>         mkdir project\n>         cd project\n>         git init\n>         git remote add origin file:///D:/sourcecode # file:// is delibrate, want \n> true n/w behaviour\n>         git config --replace-all remote.origin.fetch \n> '+refs/remotes/*:refs/remotes/*'\n>         git fetch\n> # Prevent fetch/pull from local git repo,\n> # we only want to use git svn for form here\n>        git config --remove-section remote.origin\n> # Create a local branch from one of the branches just fetched\n>         git checkout -b master FETCH_HEAD\n> # Initialize 'git svn' locally (be sure to use the same URL and -T/-b/-t \n> options as were used on server)\n>         git svn init http://svn.example.com/project\n> \n> # edit config to include newly added branch in curly braces\n> # Pull the latest changes from Subversion\n>         git svn fetch -r <recentish rev, say BEGIN>:HEAD\n> \n> Above works exactly as I want, except the last step of \"git-svn fetch\" \n> connects to svn repo for each revision from BEGIN to HEAD. I want fairly long \n> history (for pretty blame). Which implies my BEGIN is not so recentish adterall. \n> Hence, it takes awfully long to finish, 2 days typically.\n> \n> When GIT_TRACE is 1, below is output received\n> \n> trace: exec: 'git-svn' 'fetch'\n> trace: run_command: 'git-svn' 'fetch'\n> trace: built-in: git 'config' '--bool' '--get' \n> 'svn.fetchall'\n> trace: built-in: git 'config' '--bool' '--get' \n> 'svn.parent'\n> trace: built-in: git 'config' '--bool' '--get' \n> 'svn.noauthcache'\n> trace: built-in: git 'config' '--get' 'svn.revision'\n> trace: built-in: git 'config' '--bool' '--get' \n> 'svn.nocheckout'\n> trace: built-in: git 'config' '--get' 'svn.authorsprog'\n> trace: built-in: git 'config' '--bool' '--get' \n> 'svn.followparent'\n> trace: built-in: git 'config' '--get' 'svn.authorsfile'\n> trace: built-in: git 'config' '--bool' '--get' \n> 'svn.useSvmProps'\n> trace: built-in: git 'config' '--get' 'svn.username'\n> trace: built-in: git 'config' '--get' 'svn.repackflags'\n> trace: built-in: git 'config' '--bool' '--get' \n> 'svn.localtime'\n> trace: built-in: git 'config' '--int' '--get' \n> 'svn.repack'\n> trace: built-in: git 'config' '--get' 'svn.ignorepaths'\n> trace: built-in: git 'config' '--int' '--get' \n> 'svn.logwindowsize'\n> trace: built-in: git 'config' '--bool' '--get' \n> 'svn.quiet'\n> trace: built-in: git 'config' '--get' 'svn.ignorerefs'\n> trace: built-in: git 'config' '--get' 'svn.configdir'\n> trace: built-in: git 'config' '--bool' '--get' \n> 'svn.addauthorfrom'\n> trace: built-in: git 'config' '--bool' '--get' \n> 'svn.useSvnsyncProps'\n> trace: built-in: git 'config' '--bool' '--get' \n> 'svn.noMetadata'\n> trace: built-in: git 'config' '--bool' '--get' \n> 'svn.uselogauthor'\n> trace: built-in: git 'rev-parse' '--symbolic' '--all'\n> trace: built-in: git 'config' '-l'\n> trace: built-in: git 'config' '-l'\n> trace: built-in: git 'config' '--bool' 'svn.useSvmProps'\n> trace: built-in: git 'config' '-l'\n> trace: built-in: git 'config' 'svn-remote.svn.branches-maxRev' \n> '524908'\n> trace: built-in: git 'rev-list' '--pretty=raw' \n> '--reverse' \n> '9f1414be94ab007b62ace31bf4d210a069276127..refs/remotes/branch_1' \n> '--'\n> trace: built-in: git 'rev-list' '--pretty=raw' \n> '--reverse' \n> '5eb0a454bcf066a8199b851add9ec07cde80119d..refs/remotes/branch_2' \n> '--'\n> trace: built-in: git 'rev-list' '--pretty=raw' \n> '--reverse' \n> '383b68b8514010a71efe10821e5ccc3541903ceb..refs/remotes/branch_3' \n> '--'\n> trace: built-in: git 'rev-list' '--pretty=raw' \n> '--reverse' \n> '89fe1a1d2cfca0886003f043c408fb5afadfec93..refs/remotes/trunk' \n> '--'\n> \n> I keep an watch for \"svn-remote.svn.branches-maxRev\", this serves as \n> my progress. This wait is too much for a simple branch. Though, I must point \n> out, day feels fresh once it finishes :) Does any one know any for this?\n> \n> If you paid attention this is Windows machine\n> git version 1.8.1.msysgit.1\n> \n> \n> thanks,\n> Quark\n> \n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n>\n\nis this not right forum?\n\nthanks,\nQuark\n"},{"id":"218643","messageId":"20130528155411.beed9d3450d5a9d135cd93e6@domain007.com","threadId":"33950","inReplyTo":"1369726977.1915.YahooMailNeo@web190701.mail.sg3.yahoo.com","subject":"Re: git-svn too slow, contacts upstream svn repo","fromName":"Konstantin Khomoutov","fromEmail":"kostix+git@007spb.ru","sentAt":"2013-05-28T11:54:11Z","receivedAt":"2013-05-28T11:54:11Z","isPatch":false,"sender":{"key":"kostix+git@007spb.ru","avatar":null},"body":"On Tue, 28 May 2013 15:42:57 +0800 (SGT)\nQuark <unixuser2000-fbsd@yahoo.com> wrote:\n\n> > I have been using git-svn in an corporate environment where svn\n> > repo has lot of branches, (lot means > 100). To avoid cloning all\n> > branches my config looks as below\n[...]\n> is this not right forum?\n\nAs a matter of fact, this mailing list is the only correct place to ask\nquestions like yours.  But this is free software after all -- people\nwho could answer your question may be busy/absent at the moment or even\nnot involved in the project anymore (in the worst case).  So be\nprepared to wait some time.  Also be prepared for your particular\ntrouble not being solved.\n\nIn the meantime, I think Thomas provided you with valuable suggestions\nin reply to your mirror post on git-users, so you could possibly\nexplore them.\n"},{"id":"218670","messageId":"1369754459.53926.YahooMailNeo@web190706.mail.sg3.yahoo.com","threadId":"33950","inReplyTo":"20130528155411.beed9d3450d5a9d135cd93e6@domain007.com","subject":"Re: git-svn too slow, contacts upstream svn repo","fromName":"Quark","fromEmail":"unixuser2000-fbsd@yahoo.com","sentAt":"2013-05-28T15:20:59Z","receivedAt":"2013-05-28T15:20:59Z","isPatch":false,"sender":{"key":"unixuser2000-fbsd@yahoo.com","avatar":null},"body":"\n\n\n\n----- Original Message -----\n> From: Konstantin Khomoutov <kostix+git@007spb.ru>\n> To: Quark <unixuser2000-fbsd@yahoo.com>\n> Cc: Git List <git@vger.kernel.org>\n> Sent: Tuesday, 28 May 2013 5:24 PM\n> Subject: Re: git-svn too slow, contacts upstream svn repo\n> \n> On Tue, 28 May 2013 15:42:57 +0800 (SGT)\n> Quark <unixuser2000-fbsd@yahoo.com> wrote:\n> \n>>  > I have been using git-svn in an corporate environment where svn\n>>  > repo has lot of branches, (lot means > 100). To avoid cloning all\n>>  > branches my config looks as below\n> [...]\n>>  is this not right forum?\n> \n> As a matter of fact, this mailing list is the only correct place to ask\n> questions like yours.  But this is free software after all -- people\n> who could answer your question may be busy/absent at the moment or even\n> not involved in the project anymore (in the worst case).  So be\n> prepared to wait some time.  Also be prepared for your particular\n> trouble not being solved.\n> \n> In the meantime, I think Thomas provided you with valuable suggestions\n> in reply to your mirror post on git-users, so you could possibly\n> explore them.\n>\n\nI was impatient not because feeling-of-entitlement, but I thought it might get lost in pile of e-mails\nSecondly was not sure if this is right forum, I might be making noise after all, thanks for your clarification.\nNow will you please excuse, I have to check Thomas's suggestions? :)\n"}]}