git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Eric Wong <normalperson@yhbt.net>
Cc: Deskin Miller <deskinm@umich.edu>,
	git@vger.kernel.org, gitster@pobox.com
Subject: Re: [PATCH] git-svn: Make branch use correct svn-remote
Date: Tue, 02 Dec 2008 19:55:06 -0800	[thread overview]
Message-ID: <7vbpvtj4kl.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: 20081202215157.GB9650@hand.yhbt.net

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/ &&
                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

  reply	other threads:[~2008-12-03  3:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-02  2:43 [PATCH] git-svn: Make branch use correct svn-remote Deskin Miller
2008-12-02 21:51 ` Eric Wong
2008-12-03  3:55   ` Junio C Hamano [this message]
2008-12-03  9:30     ` [PATCH] Make t9128-git-svn-cmd-branch pass with svn 1.4 Michael J Gruber
2008-12-03  9:33     ` [PATCH] git-svn: Make branch use correct svn-remote Michael J Gruber
2008-12-03 20:06       ` Junio C Hamano
2008-12-03 20:42         ` Deskin Miller
2008-12-04 19:26       ` Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vbpvtj4kl.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=deskinm@umich.edu \
    --cc=git@vger.kernel.org \
    --cc=normalperson@yhbt.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).