{"thread":{"id":"42223","subject":"Found possible branch point, then \"Use of uninitialized value $u in substitution/concatenation\"","startedAt":"2016-05-05T10:43:01Z","lastAt":"2016-05-09T17:35:31Z","messageCount":5,"participants":["Thierry Suzanne","Christian Couder"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"285567","messageId":"CALZdSA_pDy=B-bgB-vjpi1yjgtse_-07ewXSX0_GsYhLfOUbzw@mail.gmail.com","threadId":"42223","inReplyTo":null,"subject":"Found possible branch point, then \"Use of uninitialized value $u in substitution/concatenation\"","fromName":"Thierry Suzanne","fromEmail":"thierry@yellownemo.com","sentAt":"2016-05-05T10:43:01Z","receivedAt":"2016-05-05T10:43:01Z","isPatch":false,"sender":{"key":"thierry@yellownemo.com","avatar":null},"body":"Hi,\n\nI am converting my SVN repository to Git.\ngit version 2.8.2.windows.1\nWindows 8.1 Pro 64bits, running Git For Windows 32bits.\n\nI have found this error mentioned here:\nhttp://stackoverflow.com/questions/15387812/git-svn-found-possible-branch-point\nand here:\nhttp://stackoverflow.com/questions/3009738/what-does-this-svn2git-error-mean\n\n\nv1 causes 2 errors, trunk address is wrong, I set it by mistake to\nsame as repository root:\n\nC:\\Windows\\system32>git svn clone\nhttps://mycompany.svn.beanstalkapp.com/myproject --no-metadata -A\nc:\\temp\\svn_to_git_users.txt\n--trunk=https://mycompany.svn.beanstalkapp.com/myproject\n--tags=https://mycompany.svn.beanstalkapp.com/myproject/tags\n--branches=https://mycompany.svn.beanstalkapp.com/myproject/branches\nc:\\code\\Git_myproject\n\n[...]\nW: +empty_dir: branches/20080918_DBDEPLOY/vendor/src/csharp/MS WCSF\nContrib/src/Services\nW: +empty_dir: branches/20080918_DBDEPLOY/vendor/src/csharp/RealWorldControls/References\nr530 = c276e3b039d8e38759c6fb17443349732552d7a2 (refs/remotes/origin/trunk)\nFound possible branch point:\nhttps://mycompany.svn.beanstalkapp.com/myproject/trunk =>\nhttps://mycompany.svn.beanstalkapp.com/myproject/branches/20080918_DBDEPLOY,\n529\nUse of uninitialized value $u in substitution (s///) at\n/mingw32/share/perl5/site_perl/Git/SVN.pm line 101.\nUse of uninitialized value $u in concatenation (.) or string at\n/mingw32/share/perl5/site_perl/Git/SVN.pm line 101.\nrefs/remotes/origin/trunk:\n'https://mycompany.svn.beanstalkapp.com/myproject' not found in ''\nC:\\Windows\\system32>\n\n\nv2 works: corrected the paths (and using relative instead of absolute\nto make line shorter)\n\nC:\\Windows\\system32>git svn clone\nhttps://mycompany.svn.beanstalkapp.com/myproject --no-metadata -A\nc:\\temp\\svn_to_git_users.txt --trunk=trunk --tags=tags\n--branches=branches c:\\code\\Git_myproject\n\n[...]\nr529 = 40442d32486f4ca6f713e659b3785a446bd19de6 (refs/remotes/origin/trunk)\nFound possible branch point:\nhttps://mycompany.svn.beanstalkapp.com/myproject/trunk =>\nhttps://mycompany.svn.beanstalkapp.com/myproject/branches/20080918_DBDEPLOY,\n529\nFound branch parent: (refs/remotes/origin/20080918_DBDEPLOY)\n40442d32486f4ca6f713e659b3785a446bd19de6\nFollowing parent with do_switch\nSuccessfully followed parent\nr530 = 9fefc1b3a892555e315d55c2024cdf3d3a05010f\n(refs/remotes/origin/20080918_DBDEPLOY)\n        A       src/database/sds.dbd\n[...]\n\n\nAs suggested on stackoverfloow posts, I opened the config file\n(C:\\code\\Git_myproject\\.git\\config) and the first version (broken) was\nas follow. The fetch is probably the wrong thing comparing with v2\n(branches and tags are duplicated too, some stackoverflow people say\nit might also cause problems).\n\n[svn-remote \"svn\"]\nnoMetadata = 1\nurl = https://mycompany.svn.beanstalkapp.com/myproject\nfetch = :refs/remotes/origin/trunk\nbranches = branches/*:refs/remotes/origin/*\ntags = tags/*:refs/remotes/origin/tags/*\nbranches = branches/*:refs/remotes/origin/*\ntags = tags/*:refs/remotes/origin/tags/*\n\nand the 2nd version (working) was:\n\n[svn-remote \"svn\"]\nnoMetadata = 1\nurl = https://mycompany.svn.beanstalkapp.com/myproject\nfetch = trunk:refs/remotes/origin/trunk\nbranches = branches/*:refs/remotes/origin/*\ntags = tags/*:refs/remotes/origin/tags/*\n\nLooking at svn.pm, I can see we're in find_parent_branch() which\noutputs the message \"Found possible branch point\". It then calls\nother_gs($new_url, $url, $branch_from, $r, $self->{ref_id});\n\nwhich itself calls:\nGit::SVN->find_by_url($new_url, $url, $branch_from);\n\nwhich calls:\nresolve_local_globs($u, $fetch, $globspec);\n\nand resolve_local_globs is where the error is thrown on line 100/101:\nmy $u = (::cmt_metadata(\"$refname\"))[0];\n$u =~ s!^\\Q$url\\E(/|$)!! or die\n\nI made a mistake in my command line for sure, so this might not be a\nbug, I'm just emailing all this if someone think it could be handled\ndifferently or a better error shown.\n\nThanks,\nT\n"},{"id":"285675","messageId":"CAP8UFD0k0Kx306S3y-Kd5328j0MDNL+ewCJvXbsJ1nzsJYRdtg@mail.gmail.com","threadId":"42223","inReplyTo":"CALZdSA_pDy=B-bgB-vjpi1yjgtse_-07ewXSX0_GsYhLfOUbzw@mail.gmail.com","subject":"Re: Found possible branch point, then \"Use of uninitialized value $u in substitution/concatenation\"","fromName":"Christian Couder","fromEmail":"christian.couder@gmail.com","sentAt":"2016-05-06T08:27:44Z","receivedAt":"2016-05-06T08:27:44Z","isPatch":false,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"Hi,\n\nOn Thu, May 5, 2016 at 12:43 PM, Thierry Suzanne <thierry@yellownemo.com> wrote:\n>\n> Looking at svn.pm, I can see we're in find_parent_branch() which\n> outputs the message \"Found possible branch point\". It then calls\n> other_gs($new_url, $url, $branch_from, $r, $self->{ref_id});\n>\n> which itself calls:\n> Git::SVN->find_by_url($new_url, $url, $branch_from);\n>\n> which calls:\n> resolve_local_globs($u, $fetch, $globspec);\n>\n> and resolve_local_globs is where the error is thrown on line 100/101:\n> my $u = (::cmt_metadata(\"$refname\"))[0];\n> $u =~ s!^\\Q$url\\E(/|$)!! or die\n>\n> I made a mistake in my command line for sure, so this might not be a\n> bug, I'm just emailing all this if someone think it could be handled\n> differently or a better error shown.\n\nYeah, there is a die() calls above and also one on line 101, so it\nlooks like $u could be checked between line 100 and line 101 and die()\ncould be called if it is not properly defined.\n\nCould you send a patch to do something like that?\n\nThanks,\nChristian.\n"},{"id":"285711","messageId":"CALZdSA_Fm0oGDYgBcfH0Ohkjw2Op5czqMgy0C9Kkss6MPck_dw@mail.gmail.com","threadId":"42223","inReplyTo":"CAP8UFD0k0Kx306S3y-Kd5328j0MDNL+ewCJvXbsJ1nzsJYRdtg@mail.gmail.com","subject":"Re: Found possible branch point, then \"Use of uninitialized value $u in substitution/concatenation\"","fromName":"Thierry Suzanne","fromEmail":"thierry@yellownemo.com","sentAt":"2016-05-06T15:32:53Z","receivedAt":"2016-05-06T15:32:53Z","isPatch":false,"sender":{"key":"thierry@yellownemo.com","avatar":null},"body":"Sorry, can't help :(\n\nOn 6 May 2016 at 09:27, Christian Couder <christian.couder@gmail.com> wrote:\n> Hi,\n>\n> On Thu, May 5, 2016 at 12:43 PM, Thierry Suzanne <thierry@yellownemo.com> wrote:\n>>\n>> Looking at svn.pm, I can see we're in find_parent_branch() which\n>> outputs the message \"Found possible branch point\". It then calls\n>> other_gs($new_url, $url, $branch_from, $r, $self->{ref_id});\n>>\n>> which itself calls:\n>> Git::SVN->find_by_url($new_url, $url, $branch_from);\n>>\n>> which calls:\n>> resolve_local_globs($u, $fetch, $globspec);\n>>\n>> and resolve_local_globs is where the error is thrown on line 100/101:\n>> my $u = (::cmt_metadata(\"$refname\"))[0];\n>> $u =~ s!^\\Q$url\\E(/|$)!! or die\n>>\n>> I made a mistake in my command line for sure, so this might not be a\n>> bug, I'm just emailing all this if someone think it could be handled\n>> differently or a better error shown.\n>\n> Yeah, there is a die() calls above and also one on line 101, so it\n> looks like $u could be checked between line 100 and line 101 and die()\n> could be called if it is not properly defined.\n>\n> Could you send a patch to do something like that?\n>\n> Thanks,\n> Christian.\n"},{"id":"285809","messageId":"CAP8UFD2dH+nDdpiURK=MePz-JiOOcv3V=NJWjdMYo--oyNZ04g@mail.gmail.com","threadId":"42223","inReplyTo":"CALZdSA_eF--tdDAPwEfopioB+X=n7Xti-ixGNJqEwvDdCwo2pg@mail.gmail.com","subject":"Re: Found possible branch point, then \"Use of uninitialized value $u in substitution/concatenation\"","fromName":"Christian Couder","fromEmail":"christian.couder@gmail.com","sentAt":"2016-05-07T07:07:18Z","receivedAt":"2016-05-07T07:07:18Z","isPatch":false,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"On Fri, May 6, 2016 at 5:31 PM, Thierry Suzanne <thierry@yellownemo.com> wrote:\n> Sorry, can't help :(\n\nI just sent a patch. It would be nice if you could test it to confirm\nthat you get a nicer error message.\n\nAlso please reply below other people's comments, as customary on this list.\n"},{"id":"285945","messageId":"CALZdSA8KU__QAywW8CoJ5=DVWPUOpyoo0Je83+6yU4CbS+PM6A@mail.gmail.com","threadId":"42223","inReplyTo":"CAP8UFD2dH+nDdpiURK=MePz-JiOOcv3V=NJWjdMYo--oyNZ04g@mail.gmail.com","subject":"Re: Found possible branch point, then \"Use of uninitialized value $u in substitution/concatenation\"","fromName":"Thierry Suzanne","fromEmail":"thierry@yellownemo.com","sentAt":"2016-05-09T17:35:31Z","receivedAt":"2016-05-09T17:35:31Z","isPatch":false,"sender":{"key":"thierry@yellownemo.com","avatar":null},"body":"On 7 May 2016 at 08:07, Christian Couder <christian.couder@gmail.com> wrote:\n>\n> On Fri, May 6, 2016 at 5:31 PM, Thierry Suzanne <thierry@yellownemo.com> wrote:\n> > Sorry, can't help :(\n>\n> I just sent a patch. It would be nice if you could test it to confirm\n> that you get a nicer error message.\n>\n> Also please reply below other people's comments, as customary on this list.\n\n\nHi,\n\nAmended my local svn.pm file with your 2 lines.\n\nFirst time:\n------------------\nC:\\code\\myproduct\\trunk>git svn clone\nhttps://mycompany.svn.beanstalkapp.com/myproduct --no-metadata -A\nc:\\temp\\svn_to_git_users.txt\n--trunk=https://mycompany.svn.beanstalkapp.com/myproduct\n--tags=https://mycompany.svn.beanstalkapp.com/myproduct/tags\n--branches=https://mycompany.svn.beanstalkapp.com/myproduct/branches\nc:\\code\\Git_TestPatch\n[....]\nW: +empty_dir: branches/20080918_DBDEPLOY/vendor/src/csharp/MS WCSF\nContrib/src/Extensions/Silverlight\nW: +empty_dir: branches/20080918_DBDEPLOY/vendor/src/csharp/MS WCSF\nContrib/src/Services\nW: +empty_dir: branches/20080918_DBDEPLOY/vendor/src/csharp/RealWorldControls/References\nr530 = c276e3b039d8e38759c6fb17443349732552d7a2 (refs/remotes/origin/trunk)\nFound possible branch point:\nhttps://mycompany.svn.beanstalkapp.com/myproduct/trunk =>\nhttps://mycompany.svn.beanstalkapp.com/myproduct/branches/20080918_DBDEPLOY,\n529\nInitializing parent: refs/remotes/origin/20080918_DBDEPLOY@529\nW: +empty_dir: trunk/etc\nW: +empty_dir: trunk/src/csharp\n[...]\nW: +empty_dir: trunk/test\nW: +empty_dir: trunk/vendor\nr5 = c71eabc20ff1f4e3fd728727470a2fa5a3802891\n(refs/remotes/origin/20080918_DBDEPLOY@529)\n        A       src/database/tables/IllustrationRow.tbl\n        A       src/database/tables/LegalEntity.tbl\n        [...]\n------------------\n\nNo error!\nCtrl+C to interrupt, ran exact same command again, this time the new error:\n------------------\nC:\\code\\myproduct\\trunk>git svn clone\nhttps://mycompany.svn.beanstalkapp.com/myproduct --no-metadata -A\nc:\\temp\\svn_to_git_users.txt\n--trunk=https://mycompany.svn.beanstalkapp.com/myproduct\n--tags=https://mycompany.svn.beanstalkapp.com/myproduct/tags\n--branches=https://mycompany.svn.beanstalkapp.com/myproduct/branches\nc:\\code\\Git_TestPatch\nFound possible branch point:\nhttps://mycompany.svn.beanstalkapp.com/myproduct/trunk =>\nhttps://mycompany.svn.beanstalkapp.com/myproduct/branches/20080918_DBDEPLOY,\n529\nrefs/remotes/origin/20080918_DBDEPLOY@529: no associated commit metadata\n\nC:\\code\\myproduct\\trunk>\n------------------\n\nSo the repro steps are potentially different. Anyway, thanks for\ntaking interest and handling the error nicely.\n\nFor the error message, as a beginner end user converting svn to git,\nthe message \"no associated commit metadata\" doesn't really make me\nthink my command line is wrong. But I'm sure with time this message\nwill appear on stackoverflow with its true meaning :-)\n\nThanks,\nT\n"}]}