Dirk schrieb:
I wonder if File::Copy allows some sort of "hook" so that we can
process each "chunk" on the fly to do this conversion? Otherwise it
may be necessary to create an intermediate file in order to perform
the conversion prior to the final copy to the dumpfile...
Hello Toby,
this is where my PERL knowledge completely stops. At this point I
would start an external converter to do the job ;-). As far as I have
seen this copy patch, but wouldn't be a block read and block write
perform a similar functionality? Somewehere I read, that you can set
filters on streams in PERL. So wouldn't be a chuncked implementation
of the copy with a CR+LF input stream and a LF output stream also do
the job?
A quick galnce into the doucmentation:
http://perldoc.perl.org/File/Copy.html
*Note that passing in files as handles instead of names may lead to loss
of information on some operating systems; it is recommended that you use
file names whenever possible.* Files are opened in binary mode where
applicable. To get a consistent behaviour when copying from a filehandle
to a file, use |binmode
<http://perldoc.perl.org/functions/binmode.html>| on the filehandle.
So wouldn't something like:
if(!defined $text && defined $file) {
if ($node->get_prop('svn:mime-type') == 'application/octet-stream');
open ($input, "<:crlf", $file)
} else {
open ($input, "<", $file);
binmode ($input);
}
copy($input, $fh);
print $fh "\n";
}
Dirk
_______________________________________________
vss2svn-users mailing list
Project homepage:
http://www.pumacode.org/projects/vss2svn/
Subscribe/Unsubscribe/Admin:
http://lists.pumacode.org/mailman/listinfo/vss2svn-users-lists.pumacode.org
Mailing list web interface (with searchable archives):
http://dir.gmane.org/gmane.comp.version-control.subversion.vss2svn.user