git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Problems with using git svn dcommit
@ 2008-08-31  7:29 Weyert de Boer
  2008-08-31 13:50 ` [PATCH] git svn: catch lack of upstream info for dcommit earlier Thomas Rast
  0 siblings, 1 reply; 3+ messages in thread
From: Weyert de Boer @ 2008-08-31  7:29 UTC (permalink / raw)
  To: git

I have initialized a GIT repository for using a subversion repository
hosted at beanstalk.com. Only I have problems with it. Each time I try
to trigger GIT SVN DCOMMIT. I am getting the following error message:

Can't call method "full_url" on an undefined value at
/opt/local/libexec/git-core/git-svn line 425.

Really strange on other repos it's working fine. Anyone might know
what could cause this?

Here you can find some output:
http://www.dustyfrog.nl/dropbox/git-svn-1.txt
http://www.dustyfrog.nl/dropbox/git-svn-2.txt

I am currently using GIT 1.6.0.1 on MacOSX 10.5.4 installed via MacPorts

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] git svn: catch lack of upstream info for dcommit earlier
  2008-08-31  7:29 Problems with using git svn dcommit Weyert de Boer
@ 2008-08-31 13:50 ` Thomas Rast
  2008-09-01  3:26   ` Eric Wong
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Rast @ 2008-08-31 13:50 UTC (permalink / raw)
  To: git; +Cc: Eric Wong, Junio C Hamano

Since 711521e 'git svn dcommit' attempts to use the upstream
information to determine the SVN URL, before it verifies that it even
found an upstream.  Move up the corresponding check.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
---

Weyert de Boer wrote:
> Can't call method "full_url" on an undefined value at
> /opt/local/libexec/git-core/git-svn line 425.

After resolving the problem on IRC, here's the fix to avoid the
unhelpful message.


 git-svn.perl |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/git-svn.perl b/git-svn.perl
index 7a1d26d..43bf201 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -421,15 +421,15 @@ sub cmd_dcommit {
 	$head ||= 'HEAD';
 	my @refs;
 	my ($url, $rev, $uuid, $gs) = working_head_info($head, \@refs);
+	unless ($gs) {
+		die "Unable to determine upstream SVN information from ",
+		    "$head history.\nPerhaps the repository is empty.";
+	}
 	$url = defined $_commit_url ? $_commit_url : $gs->full_url;
 	my $last_rev = $_revision if defined $_revision;
 	if ($url) {
 		print "Committing to $url ...\n";
 	}
-	unless ($gs) {
-		die "Unable to determine upstream SVN information from ",
-		    "$head history.\nPerhaps the repository is empty.";
-	}
 	my ($linear_refs, $parents) = linearize_history($gs, \@refs);
 	if ($_no_rebase && scalar(@$linear_refs) > 1) {
 		warn "Attempting to commit more than one change while ",
-- 
1.6.0.1.278.g5a622

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] git svn: catch lack of upstream info for dcommit earlier
  2008-08-31 13:50 ` [PATCH] git svn: catch lack of upstream info for dcommit earlier Thomas Rast
@ 2008-09-01  3:26   ` Eric Wong
  0 siblings, 0 replies; 3+ messages in thread
From: Eric Wong @ 2008-09-01  3:26 UTC (permalink / raw)
  To: Thomas Rast; +Cc: git, Junio C Hamano

Thomas Rast <trast@student.ethz.ch> wrote:
> Since 711521e 'git svn dcommit' attempts to use the upstream
> information to determine the SVN URL, before it verifies that it even
> found an upstream.  Move up the corresponding check.
> 
> Signed-off-by: Thomas Rast <trast@student.ethz.ch>

Thanks,

Acked-by: Eric Wong <normalperson@yhbt.net>

> ---
> 
> Weyert de Boer wrote:
> > Can't call method "full_url" on an undefined value at
> > /opt/local/libexec/git-core/git-svn line 425.
> 
> After resolving the problem on IRC, here's the fix to avoid the
> unhelpful message.
> 
> 
>  git-svn.perl |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/git-svn.perl b/git-svn.perl
> index 7a1d26d..43bf201 100755
> --- a/git-svn.perl
> +++ b/git-svn.perl
> @@ -421,15 +421,15 @@ sub cmd_dcommit {
>  	$head ||= 'HEAD';
>  	my @refs;
>  	my ($url, $rev, $uuid, $gs) = working_head_info($head, \@refs);
> +	unless ($gs) {
> +		die "Unable to determine upstream SVN information from ",
> +		    "$head history.\nPerhaps the repository is empty.";
> +	}
>  	$url = defined $_commit_url ? $_commit_url : $gs->full_url;
>  	my $last_rev = $_revision if defined $_revision;
>  	if ($url) {
>  		print "Committing to $url ...\n";
>  	}
> -	unless ($gs) {
> -		die "Unable to determine upstream SVN information from ",
> -		    "$head history.\nPerhaps the repository is empty.";
> -	}
>  	my ($linear_refs, $parents) = linearize_history($gs, \@refs);
>  	if ($_no_rebase && scalar(@$linear_refs) > 1) {
>  		warn "Attempting to commit more than one change while ",
> -- 
> 1.6.0.1.278.g5a622

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-09-01  3:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-31  7:29 Problems with using git svn dcommit Weyert de Boer
2008-08-31 13:50 ` [PATCH] git svn: catch lack of upstream info for dcommit earlier Thomas Rast
2008-09-01  3:26   ` Eric Wong

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).