git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH/RFC] git-svn: use path accessor for Git::SVN objects
@ 2012-09-18  0:09 Eric Wong
  2012-09-18 14:29 ` Jonathan Nieder
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Wong @ 2012-09-18  0:09 UTC (permalink / raw)
  To: Jonathan Nieder; +Cc: git, gitster, robbat2, bwalton, Michael G. Schwern

The accessors should improve maintainability and enforce
consistent access to Git::SVN objects.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
---
  (RFC since I could've missed something)

  Eric Wong <normalperson@yhbt.net> wrote:
  > I'll apply the following (on top of a patch which fixes some
  > {path} usages):

 git-svn.perl       | 2 +-
 perl/Git/SVN/Ra.pm | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/git-svn.perl b/git-svn.perl
index 0d77ffb..bd5266c 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -1314,7 +1314,7 @@ sub get_svnprops {
 	$path = $cmd_dir_prefix . $path;
 	fatal("No such file or directory: $path") unless -e $path;
 	my $is_dir = -d $path ? 1 : 0;
-	$path = join_paths($gs->{path}, $path);
+	$path = join_paths($gs->path, $path);
 
 	# canonicalize the path (otherwise libsvn will abort or fail to
 	# find the file)
diff --git a/perl/Git/SVN/Ra.pm b/perl/Git/SVN/Ra.pm
index 90ec30b..049c97b 100644
--- a/perl/Git/SVN/Ra.pm
+++ b/perl/Git/SVN/Ra.pm
@@ -416,7 +416,7 @@ sub gs_fetch_loop_common {
 		}
 		$SVN::Error::handler = $err_handler;
 
-		my %exists = map { $_->{path} => $_ } @$gsv;
+		my %exists = map { $_->path => $_ } @$gsv;
 		foreach my $r (sort {$a <=> $b} keys %revs) {
 			my ($paths, $logged) = @{$revs{$r}};
 
-- 
1.7.12.441.g0590587.dirty

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

* Re: [PATCH/RFC] git-svn: use path accessor for Git::SVN objects
  2012-09-18  0:09 [PATCH/RFC] git-svn: use path accessor for Git::SVN objects Eric Wong
@ 2012-09-18 14:29 ` Jonathan Nieder
  2012-09-18 18:10   ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Nieder @ 2012-09-18 14:29 UTC (permalink / raw)
  To: Eric Wong; +Cc: git, gitster, robbat2, bwalton, Michael G. Schwern

Eric Wong wrote:

> The accessors should improve maintainability and enforce
> consistent access to Git::SVN objects.
>
> Signed-off-by: Eric Wong <normalperson@yhbt.net>
> ---
>   (RFC since I could've missed something)
[...]
>  git-svn.perl       | 2 +-
>  perl/Git/SVN/Ra.pm | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

I think that's all of them, so for what it's worth,
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>

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

* Re: [PATCH/RFC] git-svn: use path accessor for Git::SVN objects
  2012-09-18 14:29 ` Jonathan Nieder
@ 2012-09-18 18:10   ` Junio C Hamano
  0 siblings, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2012-09-18 18:10 UTC (permalink / raw)
  To: Jonathan Nieder; +Cc: Eric Wong, git, robbat2, bwalton, Michael G. Schwern

Jonathan Nieder <jrnieder@gmail.com> writes:

> Eric Wong wrote:
>
>> The accessors should improve maintainability and enforce
>> consistent access to Git::SVN objects.
>>
>> Signed-off-by: Eric Wong <normalperson@yhbt.net>
>> ---
>>   (RFC since I could've missed something)
> [...]
>>  git-svn.perl       | 2 +-
>>  perl/Git/SVN/Ra.pm | 2 +-
>>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> I think that's all of them, so for what it's worth,
> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>

Thanks for helping to move things forward.

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

end of thread, other threads:[~2012-09-18 18:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-18  0:09 [PATCH/RFC] git-svn: use path accessor for Git::SVN objects Eric Wong
2012-09-18 14:29 ` Jonathan Nieder
2012-09-18 18:10   ` Junio C Hamano

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