From: Deskin Miller <hidden> Date: 2016-06-15 22:45:43
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 <redacted>
---
Applies on v1.6.1-rc1. Apologies for not catching this when first
writing testcases for the branch subcommand.
Deskin Miller
git-svn.perl | 2 +-
t/t9128-git-svn-cmd-branch.sh | 17 +++++++++++++++++
2 files changed, 18 insertions(+), 1 deletions(-)
From: Eric Wong <hidden> Date: 2016-06-15 22:45:43
Deskin Miller [off-list ref] 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 <redacted>
Looks alright to me, thanks Deskin.
Acked-by: Eric Wong <redacted>
quoted hunk
---
Applies on v1.6.1-rc1. Apologies for not catching this when first
writing testcases for the branch subcommand.
Deskin Miller
git-svn.perl | 2 +-
t/t9128-git-svn-cmd-branch.sh | 17 +++++++++++++++++
2 files changed, 18 insertions(+), 1 deletions(-)
From: Junio C Hamano <hidden> Date: 2016-06-15 22:45:43
Eric Wong [off-list ref] writes:
Deskin Miller [off-list ref] wrote:
quoted
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 <redacted>
Looks alright to me, thanks Deskin.
Acked-by: Eric Wong <redacted>
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
From: Michael J Gruber <hidden> Date: 2016-06-15 22:45:43
The copy command in svn 1.4 allows only one source (svn copy A D), whereas
the copy command in svn 1.5 allows multiple sources (svn copy A B C D).
This patch rewrites t9128 to use the backwards compatible form.
Signed-off-by: Michael J Gruber <redacted>
---
t/t9128-git-svn-cmd-branch.sh | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
From: Michael J Gruber <hidden> Date: 2016-06-15 22:45:43
Junio C Hamano venit, vidit, dixit 03.12.2008 04:55:
Eric Wong [off-list ref] writes:
quoted
Deskin Miller [off-list ref] wrote:
quoted
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 <redacted>
Looks alright to me, thanks Deskin.
Acked-by: Eric Wong <redacted>
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.
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