On 11/06/07, Ron Blaschke <[EMAIL PROTECTED]> wrote:
jerry gay wrote:
> On 6/11/07, Paul Cochrane <[EMAIL PROTECTED]> wrote:
>> On 09/03/07, chromatic <[EMAIL PROTECTED]> wrote:
>> > On Friday 09 March 2007 05:00, Ron Blaschke wrote:
>> >
>> > > Attached patch replaces the backslashes with slashes on Windows.
>> >
>> > Would using File::Spec be less fragile?
>>
>> I've attached a patch which uses File::Spec instead of replacing one
>> set of slashes with another. Comments welcome! :-)
>>
> good idea.
>
> instead of breaking up the path and reconstructing it separately
> (since the individual components of the path aren't used anywhere
> else,) how about using 'canonpath' to clean up the path in one step.
> something like:
>
> if ( $result =~ m{(.*) - (.*)} ) {
> my $file = canonpath $1;
> my $attribute = $2;
>
> # and add to the results hash
> $results{$file} = $attribute;
> }
I may be missing something here, but I think the problem was that the
file name sets in MANIFEST and those reported by svn must match up, but
didn't because of the file separator. MANIFEST uses forward slashes,
File::Spec those of the current platform, which probably brings you back
to square one.
But if we convert what MANIFEST provides (i.e. Unix directory
separators) into whatever the current platform needs (i.e. what
canonpath() does) then it should agree with whatever svn spits out.
Or am I missing something?
Essentially my patch is just a less fragile version of the patch you
submitted to get this test to work on Windows. (at least, I don't
think I'm changing the functionality that much).
Paul