diff options
author | Michael G. Schwern <schwern@pobox.com> | 2012-07-27 13:00:51 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2012-08-02 21:42:58 +0000 |
commit | 6a8d999ed4a0030ab7902382ed3b122ce448e581 (patch) | |
tree | cf87ed3a736875fd7e2faf1678bdfa41849d5cd1 /git-svn.perl | |
parent | b4943dc96324fec568125d7a5af1c4fdbd078543 (diff) | |
download | git-6a8d999ed4a0030ab7902382ed3b122ce448e581.tar.gz |
use Git::SVN->path accessor globally
No functional change.
[ew: commit title]
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Diffstat (limited to 'git-svn.perl')
-rwxr-xr-x | git-svn.perl | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/git-svn.perl b/git-svn.perl index 5711c5719f..039623e5c5 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -1195,7 +1195,7 @@ sub cmd_show_ignore { my ($url, $rev, $uuid, $gs) = working_head_info('HEAD'); $gs ||= Git::SVN->new; my $r = (defined $_revision ? $_revision : $gs->ra->get_latest_revnum); - $gs->prop_walk($gs->{path}, $r, sub { + $gs->prop_walk($gs->path, $r, sub { my ($gs, $path, $props) = @_; print STDOUT "\n# $path\n"; my $s = $props->{'svn:ignore'} or return; @@ -1211,7 +1211,7 @@ sub cmd_show_externals { my ($url, $rev, $uuid, $gs) = working_head_info('HEAD'); $gs ||= Git::SVN->new; my $r = (defined $_revision ? $_revision : $gs->ra->get_latest_revnum); - $gs->prop_walk($gs->{path}, $r, sub { + $gs->prop_walk($gs->path, $r, sub { my ($gs, $path, $props) = @_; print STDOUT "\n# $path\n"; my $s = $props->{'svn:externals'} or return; @@ -1226,7 +1226,7 @@ sub cmd_create_ignore { my ($url, $rev, $uuid, $gs) = working_head_info('HEAD'); $gs ||= Git::SVN->new; my $r = (defined $_revision ? $_revision : $gs->ra->get_latest_revnum); - $gs->prop_walk($gs->{path}, $r, sub { + $gs->prop_walk($gs->path, $r, sub { my ($gs, $path, $props) = @_; # $path is of the form /path/to/dir/ $path = '.' . $path; @@ -1396,7 +1396,7 @@ sub cmd_commit_diff { "the command-line\n", $usage); } $url = $gs->{url}; - $svn_path = $gs->{path}; + $svn_path = $gs->path; } unless (defined $_revision) { fatal("-r|--revision is a required argument\n", $usage); @@ -1634,6 +1634,8 @@ sub post_fetch_checkout { sub complete_svn_url { my ($url, $path) = @_; $path =~ s#/+$##; + + # If the path is not a URL... if ($path !~ m#^[a-z\+]+://#) { if (!defined $url || $url !~ m#^[a-z\+]+://#) { fatal("E: '$path' is not a complete URL ", @@ -1670,7 +1672,7 @@ sub complete_url_ls_init { "wanted to set to: $gs->{url}\n"; } command_oneline('config', $k, $gs->{url}) unless $orig_url; - my $remote_path = "$gs->{path}/$repo_path"; + my $remote_path = $gs->path . "/$repo_path"; $remote_path =~ s{%([0-9A-F]{2})}{chr hex($1)}ieg; $remote_path =~ s#/+#/#g; $remote_path =~ s#^/##g; |