]> asedeno.scripts.mit.edu Git - git.git/blobdiff - git-svn.perl
Merge branch 'pb/cvsserver'
[git.git] / git-svn.perl
index 1195569529401fd1c62414c8683a6b577721c1c7..1b44cbe10682401b9296d19f7a3595819e60702b 100755 (executable)
@@ -522,7 +522,8 @@ sub cmd_dcommit {
 }
 
 sub cmd_find_rev {
-       my $revision_or_hash = shift;
+       my $revision_or_hash = shift or die "SVN or git revision required ",
+                                           "as a command-line argument\n";
        my $result;
        if ($revision_or_hash =~ /^r\d+$/) {
                my $head = shift;
@@ -957,9 +958,10 @@ sub complete_url_ls_init {
                    "wanted to set to: $gs->{url}\n";
        }
        command_oneline('config', $k, $gs->{url}) unless $orig_url;
-       my $remote_path = "$ra->{svn_path}/$repo_path/*";
+       my $remote_path = "$ra->{svn_path}/$repo_path";
        $remote_path =~ s#/+#/#g;
        $remote_path =~ s#^/##g;
+       $remote_path .= "/*" if $remote_path !~ /\*/;
        my ($n) = ($switch =~ /^--(\w+)/);
        if (length $pfx && $pfx !~ m#/$#) {
                die "--prefix='$pfx' must have a trailing slash '/'\n";
@@ -1898,7 +1900,7 @@ sub prop_walk {
 
        foreach (sort keys %$dirent) {
                next if $dirent->{$_}->{kind} != $SVN::Node::dir;
-               $self->prop_walk($path . '/' . $_, $rev, $sub);
+               $self->prop_walk($p . $_, $rev, $sub);
        }
 }
 
@@ -3663,7 +3665,7 @@ sub escape_uri_only {
        my ($uri) = @_;
        my @tmp;
        foreach (split m{/}, $uri) {
-               s/([^\w.-])/sprintf("%%%02X",ord($1))/eg;
+               s/([^\w.%-]|%(?![a-fA-F0-9]{2}))/sprintf("%%%02X",ord($1))/eg;
                push @tmp, $_;
        }
        join('/', @tmp);