git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* a git svn bug
@ 2018-12-27 17:02 肖建晶
  2018-12-29  4:16 ` Eric Wong
  0 siblings, 1 reply; 3+ messages in thread
From: 肖建晶 @ 2018-12-27 17:02 UTC (permalink / raw)
  To: git

hi,
   git developers. I found a bug when i want to convert webkit to git
   there are some branch named safari... in webkit svn repo.
   when i want to convert them to branch in git. a problem happen.

   if you want to reproduce the problem, just follow the guide below.
   1. git svn clone -s https://svn.webkit.org/......

   2. when it runs to about r13800, stop it and rerun the above command

   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

   i digged into it, and found a solution in git/perl/git/svn.pm. I mod this file and bypass the problem.

   plean be kind to fix the problem and remind me the fix commit, and i will update to a new version.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: a git svn bug
  2018-12-27 17:02 a git svn bug 肖建晶
@ 2018-12-29  4:16 ` Eric Wong
  2019-02-11  8:57   ` 肖建晶
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Wong @ 2018-12-29  4:16 UTC (permalink / raw)
  To: 肖建晶; +Cc: git

肖建晶 <06271023@bjtu.edu.cn> wrote:
> hi,
>    git developers. I found a bug when i want to convert webkit to git
>    there are some branch named safari... in webkit svn repo.
>    when i want to convert them to branch in git. a problem happen.
> 
>    if you want to reproduce the problem, just follow the guide below.
>    1. git svn clone -s https://svn.webkit.org/......

Do you mean  https://svn.webkit.org/repository/webkit ?

>    2. when it runs to about r13800, stop it and rerun the above command

So running "clone" again?  Normally, I'd run "git svn fetch" if
I stopped and want to resume (or my Internet connection drops,
which happens a lot).

>    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
>j
>    i digged into it, and found a solution in
>    git/perl/git/svn.pm. I mod this file and bypass the
>    problem.

Can you show us what you did to perl/Git/SVN.pm?

the "refname" sub in perl/Git/SVN.pm already escapes "~",
it seems.

>    plean be kind to fix the problem and remind me the fix
>    commit, and i will update to a new version.

We'll try, but I think we need more information.  Thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Re: a git svn bug
  2018-12-29  4:16 ` Eric Wong
@ 2019-02-11  8:57   ` 肖建晶
  0 siblings, 0 replies; 3+ messages in thread
From: 肖建晶 @ 2019-02-11  8:57 UTC (permalink / raw)
  To: Eric Wong; +Cc: git


> 肖建晶 <06271023@bjtu.edu.cn> wrote:
> > hi,
> >    git developers. I found a bug when i want to convert webkit to git
> >    there are some branch named safari... in webkit svn repo.
> >    when i want to convert them to branch in git. a problem happen.
> > 
> >    if you want to reproduce the problem, just follow the guide below.
> >    1. git svn clone -s https://svn.webkit.org/......
> 
> Do you mean  https://svn.webkit.org/repository/webkit ?
>
You are right. I use this url to fetch svn repo
 
> >    2. when it runs to about r13800, stop it and rerun the above command
> 
> So running "clone" again?  Normally, I'd run "git svn fetch" if
> I stopped and want to resume (or my Internet connection drops,
> which happens a lot).
> 
In fact, git svn clone again and git svn fetch will do nearly the same thing.
So we could use these two commands either. I just get used to git svn clone.

> >    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
> >j
> >    i digged into it, and found a solution in
> >    git/perl/git/svn.pm. I mod this file and bypass the
> >    problem.
> 
> Can you show us what you did to perl/Git/SVN.pm?
> 
> the "refname" sub in perl/Git/SVN.pm already escapes "~",
> it seems.
> 

  ***  i used this sed to fix it:
       sed -i "/refname = /a\\\t\t\$refname =~ s/~/%7E/g;" perl/Git/SVN.pm
       sed -i "/refname = /a\\\t\t\$refname =~ s/ /%20/g;" perl/Git/SVN.pm
       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.

> >    plean be kind to fix the problem and remind me the fix
> >    commit, and i will update to a new version.
> 
> We'll try, but I think we need more information.  Thanks.

unfortunately, 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.

If you have any question, feel free to inform me. I always eager to help in my spare time.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-02-11  8:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-27 17:02 a git svn bug 肖建晶
2018-12-29  4:16 ` Eric Wong
2019-02-11  8:57   ` 肖建晶

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).