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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Eric Wong <normalperson@xxxxxxxx> writes:

> Deskin Miller <deskinm@xxxxxxxxx> 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@xxxxxxxxx>
>
> Looks alright to me, thanks Deskin.
>
> Acked-by: Eric Wong <normalperson@xxxxxxxx>

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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux