git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git-svn: Add a svn-remote.<name>.pushurl config key

From
Alejandro R. Sedeño <asedeno@mit.edu>
Date
Apr 6, 2011, 15:34 UTC
Message-ID
<4D9C8803.1000708@mit.edu>
In-Reply-To
<4D9C851A.7070801@drmicha.warpmail.net>
On 04/06/2011 11:22 AM, Michael J Gruber wrote:
Show 5 quoted lines
> Alejandro R. Sedeño venit, vidit, dixit 06.04.2011 17:05:
>> Signed-off-by: Alejandro R. Sedeño <asedeno@mit.edu>
>> Reviewed-off-by: James Y Knight <jknight@itasoftware.com>
> 
> :) So, if that review is off, that means...
Um, s/-off//. Oops :)
I can send a follow-up, or let Eric deal with that change, however he prefers.
Show 13 quoted lines
>> diff --git a/git-svn.perl b/git-svn.perl
>> index fa8cd07..184442a 100755
>> --- a/git-svn.perl
>> +++ b/git-svn.perl
>> @@ -531,7 +531,7 @@ sub cmd_dcommit {
>>  		$url = eval { command_oneline('config', '--get',
>>  			      "svn-remote.$gs->{repo_id}.commiturl") };
>>  		if (!$url) {
>> -			$url = $gs->full_url
>> +			$url = $gs->full_pushurl
> 
> Wouldn't we want to do the same $gs->full_pushurl || $gs->full_url fall
> back here as below, or is fullpush_url always set? OK, I see it always is.

Yeah, I just went with full_pushurl returning full_url in cases where pushurl is not set.

Show 8 quoted lines
>> @@ -2071,6 +2073,8 @@ sub new {
>>  	$self->{url} = command_oneline('config', '--get',
>>  	                               "svn-remote.$repo_id.url") or
>>                    die "Failed to read \"svn-remote.$repo_id.url\" in config\n";
>> +	$self->{pushurl} = eval { command_oneline('config', '--get',
>> +	                          "svn-remote.$repo_id.pushurl") };
> 
> Why eval? We don't do it for url either.
Because otherwise it would die with:
  $ git svn fetch
  config --get svn-remote.svn.pushurl: command returned error: 1

when pushurl wasn't defined. If that happens with 'url' too, well, that's a mis-configured git-svn remote.

>> +sub full_pushurl {
>> +	my ($self) = @_;
> 
> Isn't that a noop?
I'm just copying the style of sub full_url here.
-Alejandro
Previous: Michael J GruberNext: Michael J Gruber
Message 15 of 33 in “[PATCHv2 0/2] a couple of git-svn patches”
  1. Alejandro R. SedeñoApr 4, 2011
  2. 1/2 git-svn: Fix the commit-url config to be the base url, just like the url configAlejandro R. Sedeño, Apr 4, 2011
  3. Eric WongApr 4, 2011
  4. James Y KnightApr 4, 2011
  5. Eric WongApr 4, 2011
  6. Alejandro R. SedeñoApr 5, 2011
  7. git-svn: Add a svn-remote.<name>.pushurl config keyAlejandro R. Sedeño, Apr 5, 2011
  8. Alejandro R. SedeñoApr 5, 2011
  9. Eric WongApr 5, 2011
  10. Michael J GruberApr 6, 2011
  11. Alejandro R. SedeñoApr 6, 2011
  12. Michael J GruberApr 6, 2011
  13. git-svn: Add a svn-remote.<name>.pushurl config keyAlejandro R. Sedeño, Apr 6, 2011
  14. Michael J GruberApr 6, 2011
  15. Alejandro R. SedeñoApr 6, 2011
  16. Michael J GruberApr 6, 2011
  17. git-svn: Add a svn-remote.<name>.pushurl config keyAlejandro R. Sedeño, Apr 8, 2011
  18. Junio C HamanoApr 8, 2011
  19. Michael J GruberApr 8, 2011
  20. Jeff KingApr 8, 2011
  21. Eric WongApr 9, 2011
  22. Michael J GruberApr 6, 2011
  23. Alejandro R. SedeñoApr 6, 2011
  24. 2/2 git-svn: Cache results of running the executable "git config"Alejandro R. Sedeño, Apr 4, 2011
  25. Eric WongApr 4, 2011
  26. Junio C HamanoApr 5, 2011
  27. Jeff KingApr 8, 2011
  28. Junio C HamanoApr 8, 2011
  29. Jeff KingApr 8, 2011
  30. Jeff KingApr 8, 2011
  31. Alejandro R. SedeñoApr 22, 2011
  32. Jeff KingApr 22, 2011
  33. Alejandro R. SedeñoApr 22, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.