# [PATCH] git-svn: fix commits over svn+ssh://

2 messages from 2006-10-14 to 2006-10-14. Participants: Eric Wong, Pierre HABOUZIT.
Thread: https://gitlist.dev/t/5917

## Eric Wong, 2006-10-14 09:02

Subject: [PATCH] git-svn: fix commits over svn+ssh://
Message-ID: <11608165571212-git-send-email-normalperson@yhbt.net>
URL: https://gitlist.dev/e/11608165571212-git-send-email-normalperson%40yhbt.net

```
Once a get_commit_editor has been called from an SVN session, RA
layer operations are not allowed (well, unless you're using
file:// or http(s)://).  So we'll pass an alternate SVN::Ra
object to our editor object for running 'check-path'.

This should fix commits over svnserve (svn:// without ssh, too).

Closes Debian bug #392702, thanks to Pierre Habouzit for
reporting the bug.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
---
 git-svn.perl |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/git-svn.perl b/git-svn.perl
index a128d90..0f968c8 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -536,7 +536,7 @@ sub commit_lib {
 			$SVN = libsvn_connect($repo);
 			my $ed = SVN::Git::Editor->new(
 					{	r => $r_last,
-						ra => $SVN,
+						ra => $SVN_LOG,
 						c => $c,
 						svn_path => $SVN_PATH
 					},
@@ -832,7 +832,7 @@ sub commit_diff {
 	$SVN ||= libsvn_connect($repo);
 	my @lock = $SVN::Core::VERSION ge '1.2.0' ? (undef, 0) : ();
 	my $ed = SVN::Git::Editor->new({	r => $SVN->get_latest_revnum,
-						ra => $SVN, c => $tb,
+						ra => $SVN_LOG, c => $tb,
 						svn_path => $SVN_PATH
 					},
 				$SVN->get_commit_editor($_message,
-- 
1.4.3.rc2.g1cbb0

```

## Pierre HABOUZIT, 2006-10-14 14:57

Subject: [PATCH] Re: git-svn: fix commits over svn+ssh://
Message-ID: <20061014145751.GA8840@hades.madism.org>
URL: https://gitlist.dev/e/20061014145751.GA8840%40hades.madism.org
In-Reply-To: <11608165571212-git-send-email-normalperson@yhbt.net>

```
  I confirm that fixes it indeed.

On Sat, Oct 14, 2006 at 02:02:37AM -0700, Eric Wong wrote:
> Once a get_commit_editor has been called from an SVN session, RA
> layer operations are not allowed (well, unless you're using
> file:// or http(s)://).  So we'll pass an alternate SVN::Ra
> object to our editor object for running 'check-path'.
> 
> This should fix commits over svnserve (svn:// without ssh, too).
> 
> Closes Debian bug #392702, thanks to Pierre Habouzit for
> reporting the bug.
> 
> Signed-off-by: Eric Wong <normalperson@yhbt.net>
> ---
>  git-svn.perl |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/git-svn.perl b/git-svn.perl
> index a128d90..0f968c8 100755
> --- a/git-svn.perl
> +++ b/git-svn.perl
> @@ -536,7 +536,7 @@ sub commit_lib {
>  			$SVN = libsvn_connect($repo);
>  			my $ed = SVN::Git::Editor->new(
>  					{	r => $r_last,
> -						ra => $SVN,
> +						ra => $SVN_LOG,
>  						c => $c,
>  						svn_path => $SVN_PATH
>  					},
> @@ -832,7 +832,7 @@ sub commit_diff {
>  	$SVN ||= libsvn_connect($repo);
>  	my @lock = $SVN::Core::VERSION ge '1.2.0' ? (undef, 0) : ();
>  	my $ed = SVN::Git::Editor->new({	r => $SVN->get_latest_revnum,
> -						ra => $SVN, c => $tb,
> +						ra => $SVN_LOG, c => $tb,
>  						svn_path => $SVN_PATH
>  					},
>  				$SVN->get_commit_editor($_message,
-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org

```
