git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git-svn: Make branch use correct svn-remote

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Dec 3, 2008, 09:33 UTC
Message-ID
<49365259.5090803@drmicha.warpmail.net>
In-Reply-To
<7vbpvtj4kl.fsf@gitster.siamese.dyndns.org>
Junio C Hamano venit, vidit, dixit 03.12.2008 04:55:
Show 61 quoted lines
> Eric Wong <normalperson@yhbt.net> writes:
> 
>> Deskin Miller <deskinm@umich.edu> wrote:
>>> The 'branch' subcommand incorrectly had the svn-remote to use hardcoded
>>> as 'svn', the default remote name.  This meant that branches derived
>>> from other svn-remotes would try to use the branch and tag configuration
>>> for the 'svn' remote, potentially copying would-be branches to the wrong
>>> place in SVN, into the branch namespace for another project.
>>>
>>> Fix this by using the remote name extracted from the svn info for the
>>> specified git ref.  Add a testcase for this behaviour.
>>>
>>> Signed-off-by: Deskin Miller <deskinm@umich.edu>
>> Looks alright to me, thanks Deskin.
>>
>> Acked-by: Eric Wong <normalperson@yhbt.net>
> 
> Does not work for me X-<.
> 
> * expecting success:
>         (svn co "$svnrepo" svn &&
>         cd svn &&
>         mkdir mirror &&
>         svn add mirror &&
>         svn copy trunk tags branches mirror/ &&
>         svn ci -m "made mirror" ) &&
>         rm -rf svn &&
>         git svn init -s -R mirror --prefix=mirror/ "$svnrepo"/mirror &&
>         git svn fetch -R mirror &&
>         git checkout mirror/trunk &&
>         base=$(git rev-parse HEAD:) &&
>         git svn branch -m "branch in mirror" d &&
>         test $base = $(git rev-parse remotes/mirror/d:) &&
>         test_must_fail git rev-parse remotes/d
> 
> A    svn/trunk
> A    svn/trunk/foo
> A    svn/branches
> A    svn/branches/a
> A    svn/branches/a/foo
> A    svn/branches/b
> A    svn/branches/b/foo
> A    svn/tags
> A    svn/tags/tag4
> A    svn/tags/tag4/foo
> A    svn/tags/tag1
> A    svn/tags/tag1/foo
> A    svn/tags/tag2
> A    svn/tags/tag2/foo
> A    svn/tags/tag3
> A    svn/tags/tag3/foo
> Checked out revision 8.
> A         mirror
> svn: Client error in parsing arguments
> * FAIL 4: branch uses correct svn-remote
> 
>                 (svn co "$svnrepo" svn &&
>                 cd svn &&
>                 mkdir mirror &&
>                 svn add mirror &&
>                 svn copy trunk tags branches mirror/ &&

With my svn (1.4.6) it fails already here: "svn copy" allows two arguments only. That may be different in svn 1.5.

Show 9 quoted lines
>                 svn ci -m "made mirror" ) &&
>                 rm -rf svn &&
>                 git svn init -s -R mirror --prefix=mirror/ "$svnrepo"/mirror &&
>                 git svn fetch -R mirror &&
>                 git checkout mirror/trunk &&
>                 base=$(git rev-parse HEAD:) &&
>                 git svn branch -m "branch in mirror" d &&
>                 test $base = $(git rev-parse remotes/mirror/d:) &&
>                 test_must_fail git rev-parse remotes/d

If I split the above copy into three lines then the test passes (svn 1.4.6, Deskin's patch applied onto 1.6.1-rc1 with the fix.

Patch coming. (Sorry I always forget the ccs with send-email.)
Michael
Previous: Michael J GruberNext: Junio C Hamano
Message 5 of 8 in “git-svn: Make branch use correct svn-remote”
  1. git-svn: Make branch use correct svn-remoteDeskin Miller, Dec 2, 2008
  2. Eric WongDec 2, 2008
  3. Junio C HamanoDec 3, 2008
  4. Make t9128-git-svn-cmd-branch pass with svn 1.4Michael J Gruber, Dec 3, 2008
  5. Michael J GruberDec 3, 2008
  6. Junio C HamanoDec 3, 2008
  7. Deskin MillerDec 3, 2008
  8. Eric WongDec 4, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.