{"thread":{"id":"15296","subject":"Problems with using git svn dcommit","startedAt":"2008-08-31T07:29:22Z","lastAt":"2008-09-01T03:26:57Z","messageCount":3,"participants":["Weyert de Boer","Thomas Rast","Eric Wong"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"89294","messageId":"c7d83d0d0808310029s15c1413m49cad5c68a568271@mail.gmail.com","threadId":"15296","inReplyTo":null,"subject":"Problems with using git svn dcommit","fromName":"Weyert de Boer","fromEmail":"weyert@gmail.com","sentAt":"2008-08-31T07:29:22Z","receivedAt":"2008-08-31T07:29:22Z","isPatch":false,"sender":{"key":"weyert@gmail.com","avatar":null},"body":"I have initialized a GIT repository for using a subversion repository\nhosted at beanstalk.com. Only I have problems with it. Each time I try\nto trigger GIT SVN DCOMMIT. I am getting the following error message:\n\nCan't call method \"full_url\" on an undefined value at\n/opt/local/libexec/git-core/git-svn line 425.\n\nReally strange on other repos it's working fine. Anyone might know\nwhat could cause this?\n\nHere you can find some output:\nhttp://www.dustyfrog.nl/dropbox/git-svn-1.txt\nhttp://www.dustyfrog.nl/dropbox/git-svn-2.txt\n\nI am currently using GIT 1.6.0.1 on MacOSX 10.5.4 installed via MacPorts\n"},{"id":"89313","messageId":"1220190659-5955-1-git-send-email-trast@student.ethz.ch","threadId":"15296","inReplyTo":"c7d83d0d0808310029s15c1413m49cad5c68a568271@mail.gmail.com","subject":"[PATCH] git svn: catch lack of upstream info for dcommit earlier","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2008-08-31T13:50:59Z","receivedAt":"2008-08-31T13:50:59Z","isPatch":true,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"Since 711521e 'git svn dcommit' attempts to use the upstream\ninformation to determine the SVN URL, before it verifies that it even\nfound an upstream.  Move up the corresponding check.\n\nSigned-off-by: Thomas Rast <trast@student.ethz.ch>\n---\n\nWeyert de Boer wrote:\n> Can't call method \"full_url\" on an undefined value at\n> /opt/local/libexec/git-core/git-svn line 425.\n\nAfter resolving the problem on IRC, here's the fix to avoid the\nunhelpful message.\n\n\n git-svn.perl |    8 ++++----\n 1 files changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/git-svn.perl b/git-svn.perl\nindex 7a1d26d..43bf201 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -421,15 +421,15 @@ sub cmd_dcommit {\n \t$head ||= 'HEAD';\n \tmy @refs;\n \tmy ($url, $rev, $uuid, $gs) = working_head_info($head, \\@refs);\n+\tunless ($gs) {\n+\t\tdie \"Unable to determine upstream SVN information from \",\n+\t\t    \"$head history.\\nPerhaps the repository is empty.\";\n+\t}\n \t$url = defined $_commit_url ? $_commit_url : $gs->full_url;\n \tmy $last_rev = $_revision if defined $_revision;\n \tif ($url) {\n \t\tprint \"Committing to $url ...\\n\";\n \t}\n-\tunless ($gs) {\n-\t\tdie \"Unable to determine upstream SVN information from \",\n-\t\t    \"$head history.\\nPerhaps the repository is empty.\";\n-\t}\n \tmy ($linear_refs, $parents) = linearize_history($gs, \\@refs);\n \tif ($_no_rebase && scalar(@$linear_refs) > 1) {\n \t\twarn \"Attempting to commit more than one change while \",\n-- \n1.6.0.1.278.g5a622\n"},{"id":"89357","messageId":"20080901032657.GC25876@hand.yhbt.net","threadId":"15296","inReplyTo":"1220190659-5955-1-git-send-email-trast@student.ethz.ch","subject":"Re: [PATCH] git svn: catch lack of upstream info for dcommit earlier","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2008-09-01T03:26:57Z","receivedAt":"2008-09-01T03:26:57Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Thomas Rast <trast@student.ethz.ch> wrote:\n> Since 711521e 'git svn dcommit' attempts to use the upstream\n> information to determine the SVN URL, before it verifies that it even\n> found an upstream.  Move up the corresponding check.\n> \n> Signed-off-by: Thomas Rast <trast@student.ethz.ch>\n\nThanks,\n\nAcked-by: Eric Wong <normalperson@yhbt.net>\n\n> ---\n> \n> Weyert de Boer wrote:\n> > Can't call method \"full_url\" on an undefined value at\n> > /opt/local/libexec/git-core/git-svn line 425.\n> \n> After resolving the problem on IRC, here's the fix to avoid the\n> unhelpful message.\n> \n> \n>  git-svn.perl |    8 ++++----\n>  1 files changed, 4 insertions(+), 4 deletions(-)\n> \n> diff --git a/git-svn.perl b/git-svn.perl\n> index 7a1d26d..43bf201 100755\n> --- a/git-svn.perl\n> +++ b/git-svn.perl\n> @@ -421,15 +421,15 @@ sub cmd_dcommit {\n>  \t$head ||= 'HEAD';\n>  \tmy @refs;\n>  \tmy ($url, $rev, $uuid, $gs) = working_head_info($head, \\@refs);\n> +\tunless ($gs) {\n> +\t\tdie \"Unable to determine upstream SVN information from \",\n> +\t\t    \"$head history.\\nPerhaps the repository is empty.\";\n> +\t}\n>  \t$url = defined $_commit_url ? $_commit_url : $gs->full_url;\n>  \tmy $last_rev = $_revision if defined $_revision;\n>  \tif ($url) {\n>  \t\tprint \"Committing to $url ...\\n\";\n>  \t}\n> -\tunless ($gs) {\n> -\t\tdie \"Unable to determine upstream SVN information from \",\n> -\t\t    \"$head history.\\nPerhaps the repository is empty.\";\n> -\t}\n>  \tmy ($linear_refs, $parents) = linearize_history($gs, \\@refs);\n>  \tif ($_no_rebase && scalar(@$linear_refs) > 1) {\n>  \t\twarn \"Attempting to commit more than one change while \",\n> -- \n> 1.6.0.1.278.g5a622\n"}]}