{"thread":{"id":"50116","subject":"a git svn bug","startedAt":"2018-12-27T17:00:31Z","lastAt":"2019-02-11T08:59:49Z","messageCount":3,"participants":["肖建晶","Eric Wong"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"365869","messageId":"650358a3.8395.167f09e21b6.Coremail.06271023@bjtu.edu.cn","threadId":"50116","inReplyTo":null,"subject":"a git svn bug","fromName":"肖建晶","fromEmail":"06271023@bjtu.edu.cn","sentAt":"2018-12-27T17:02:34Z","receivedAt":"2018-12-27T17:00:31Z","isPatch":false,"sender":{"key":"06271023@bjtu.edu.cn","avatar":null},"body":"hi,\n   git developers. I found a bug when i want to convert webkit to git\n   there are some branch named safari... in webkit svn repo.\n   when i want to convert them to branch in git. a problem happen.\n\n   if you want to reproduce the problem, just follow the guide below.\n   1. git svn clone -s https://svn.webkit.org/......\n\n   2. when it runs to about r13800, stop it and rerun the above command\n\n   3. the git client will check the refs it already found, and if it met a ~ in the branch name. it will failed to proceed. error is git thinks it an invalid ref name\n\n   i digged into it, and found a solution in git/perl/git/svn.pm. I mod this file and bypass the problem.\n\n   plean be kind to fix the problem and remind me the fix commit, and i will update to a new version.\n\n"},{"id":"365937","messageId":"20181229041615.ay7pazjqozbvz7qz@dcvr","threadId":"50116","inReplyTo":"650358a3.8395.167f09e21b6.Coremail.06271023@bjtu.edu.cn","subject":"Re: a git svn bug","fromName":"Eric Wong","fromEmail":"e@80x24.org","sentAt":"2018-12-29T04:16:15Z","receivedAt":"2018-12-29T04:22:49Z","isPatch":false,"sender":{"key":"e@80x24.org","avatar":null},"body":"肖建晶 <06271023@bjtu.edu.cn> wrote:\n> hi,\n>    git developers. I found a bug when i want to convert webkit to git\n>    there are some branch named safari... in webkit svn repo.\n>    when i want to convert them to branch in git. a problem happen.\n> \n>    if you want to reproduce the problem, just follow the guide below.\n>    1. git svn clone -s https://svn.webkit.org/......\n\nDo you mean  https://svn.webkit.org/repository/webkit ?\n\n>    2. when it runs to about r13800, stop it and rerun the above command\n\nSo running \"clone\" again?  Normally, I'd run \"git svn fetch\" if\nI stopped and want to resume (or my Internet connection drops,\nwhich happens a lot).\n\n>    3. the git client will check the refs it already found, and\n>    if it met a ~ in the branch name. it will failed to\n>    proceed. error is git thinks it an invalid ref name\n>j\n>    i digged into it, and found a solution in\n>    git/perl/git/svn.pm. I mod this file and bypass the\n>    problem.\n\nCan you show us what you did to perl/Git/SVN.pm?\n\nthe \"refname\" sub in perl/Git/SVN.pm already escapes \"~\",\nit seems.\n\n>    plean be kind to fix the problem and remind me the fix\n>    commit, and i will update to a new version.\n\nWe'll try, but I think we need more information.  Thanks.\n"},{"id":"369007","messageId":"16f3efae.125ea.168dbc6689b.Coremail.06271023@bjtu.edu.cn","threadId":"50116","inReplyTo":"20181229041615.ay7pazjqozbvz7qz@dcvr","subject":"Re: Re: a git svn bug","fromName":"肖建晶","fromEmail":"06271023@bjtu.edu.cn","sentAt":"2019-02-11T08:57:19Z","receivedAt":"2019-02-11T08:59:49Z","isPatch":false,"sender":{"key":"06271023@bjtu.edu.cn","avatar":null},"body":"\n> 肖建晶 <06271023@bjtu.edu.cn> wrote:\n> > hi,\n> >    git developers. I found a bug when i want to convert webkit to git\n> >    there are some branch named safari... in webkit svn repo.\n> >    when i want to convert them to branch in git. a problem happen.\n> > \n> >    if you want to reproduce the problem, just follow the guide below.\n> >    1. git svn clone -s https://svn.webkit.org/......\n> \n> Do you mean  https://svn.webkit.org/repository/webkit ?\n>\nYou are right. I use this url to fetch svn repo\n \n> >    2. when it runs to about r13800, stop it and rerun the above command\n> \n> So running \"clone\" again?  Normally, I'd run \"git svn fetch\" if\n> I stopped and want to resume (or my Internet connection drops,\n> which happens a lot).\n> \nIn fact, git svn clone again and git svn fetch will do nearly the same thing.\nSo we could use these two commands either. I just get used to git svn clone.\n\n> >    3. the git client will check the refs it already found, and\n> >    if it met a ~ in the branch name. it will failed to\n> >    proceed. error is git thinks it an invalid ref name\n> >j\n> >    i digged into it, and found a solution in\n> >    git/perl/git/svn.pm. I mod this file and bypass the\n> >    problem.\n> \n> Can you show us what you did to perl/Git/SVN.pm?\n> \n> the \"refname\" sub in perl/Git/SVN.pm already escapes \"~\",\n> it seems.\n> \n\n  ***  i used this sed to fix it:\n       sed -i \"/refname = /a\\\\\\t\\t\\$refname =~ s/~/%7E/g;\" perl/Git/SVN.pm\n       sed -i \"/refname = /a\\\\\\t\\t\\$refname =~ s/ /%20/g;\" perl/Git/SVN.pm\n       You can use the regex above to find the exact place (about line 93 )where the issue happens. I think after the sentence refname = ....,  variable refname should be right, but it seems not. Please examine if after that sentence, refname contains some symbol like ~ or \" \"(space). If it does, the command after that may not deal with it correctly. Please be kind to check it again.\n\n> >    plean be kind to fix the problem and remind me the fix\n> >    commit, and i will update to a new version.\n> \n> We'll try, but I think we need more information.  Thanks.\n\nunfortunately, after several days of work. The whole webkit is not converted into git repo, because I met another problem. It said index mismatch. And I was not able to solve it anymore. I plan to convert it later again. It's awful.\n\nIf you have any question, feel free to inform me. I always eager to help in my spare time.\n\n"}]}