Changeset 323
- Timestamp:
- 07/18/2007 12:19:19 PM
- Files:
-
- trunk/script/Vss2Svn/Dumpfile.pm (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/script/Vss2Svn/Dumpfile.pm
r319 r323 309 309 my $node = Vss2Svn::Dumpfile::Node->new(); 310 310 $node->set_initial_props($newpath, $data); 311 # change the properties according to the new name 312 if (defined $self->{auto_props}) { 313 $node->add_props ($self->{auto_props}->get_props ($newpath)); 314 } 311 315 $node->{action} = 'add'; 312 316 … … 765 769 my $fh = $self->{fh}; 766 770 771 # only in an add or rename action the propery array is set. So we have 772 # to lookup the eol-style flag again. The best thing is to query the 773 # property always temporarirly 774 my %tmpProps = (); 775 if (defined $self->{auto_props}) { 776 %tmpProps = $self->{auto_props}->get_props ($node->{path}); 777 } 778 my $eolStyle = %tmpProps->{'svn:eol-style'}; 779 my $isNative = (defined $eolStyle && $eolStyle eq 'native') ? 1 : 0; 780 767 781 my $string = $node->get_headers(); 768 782 print $fh $string; 769 783 $self->output_content($node->{hideprops}? undef : $node->{props}, 770 $node->{text}, $node->{file} );784 $node->{text}, $node->{file}, $isNative); 771 785 } # End output_node 772 786 … … 775 789 ############################################################################### 776 790 sub output_content { 777 my($self, $props, $text, $file ) = @_;791 my($self, $props, $text, $file, $isNative) = @_; 778 792 779 793 my $fh = $self->{fh}; … … 804 818 $md5 = Digest::MD5->new if $self->{do_md5}; 805 819 820 # prevent errors due to non existing files 821 if(!defined $text && defined $file && !-e $file) { 822 $text = ""; 823 } 824 806 825 # convert CRLF -> LF before calculating the size and compute the md5 807 826 if(!defined $text && defined $file) { 808 my ($input, $output);809 my $style = $props->{'svn:eol-style'};810 if (defined $ style && $style eq 'native') {827 828 my ($input, $output); 829 if (defined $isNative) { 811 830 open ($input, "<:crlf", $file); 812 831 my $tmpFile = "$gTmpDir/crlf_to_lf.tmp.txt";
