[Webkit-unassigned] [Bug 74469] svn scripts cannot handle files with @ symbols

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Dec 14 19:07:43 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=74469


Adam Roben (:aroben) <aroben at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #119133|review?                     |review+
               Flag|                            |




--- Comment #4 from Adam Roben (:aroben) <aroben at apple.com>  2011-12-14 19:07:43 PST ---
(From update of attachment 119133)
View in context: https://bugs.webkit.org/attachment.cgi?id=119133&action=review

> Tools/Scripts/VCSUtils.pm:1997
> +sub escapePath($)
> +{
> +    my ($path) = @_;
> +    $path .= "@" if $path =~ /@/;
> +    return $path;
> +}

Since this function only makes sense for Subversion, it should probably either do nothing for git or have a name that makes it clear it's Subversion-only. Maybe escapeSubversionPath?

> Tools/Scripts/prepare-ChangeLog:1340
> +        my @escapedPaths;
> +        foreach my $path (@paths) { push @escapedPaths, escapePath($path); }

You can do this more succinctly with map:

my @escapedPaths = map(escapePath, @paths);

Seems like $pathsString should become a variable that's only used in the git codepath.

> Tools/Scripts/prepare-ChangeLog:1361
> +        my @escapedFiles;
> +        foreach my $file (@files) { push @escapedFiles, escapePath($file); }
> +        my $escapedFilesString = "'" . join("' '", @escapedFiles) . "'";
> +        $command = "$SVN stat $escapedFilesString";

Same comments as above.

> Tools/Scripts/svn-apply:455
> +        open SVN, "svn rm --force '$escapedPath' |" or die "svn rm --force '$path' failed!";

You should use $escapedPath in the error message too.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list