Changeset 802 for dasscm/trunk
- Timestamp:
- Nov 11, 2009, 1:30:06 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
dasscm/trunk/dasscm
r801 r802 11 11 use File::Basename; 12 12 use File::Compare; 13 use File::Copy; 13 # used system("cp -a"), because File::Copy does not keep permissions 14 #use File::Copy; 14 15 use File::Find; 15 16 use File::stat; … … 373 374 ) = get_filenames($filename); 374 375 375 # TODO: are permissions also copied? 376 copy( $filename_prod, $filename_repo ) 377 or error "failed to copy $filename_prod to repository: $!"; 378 } 376 #copy( $filename_prod, $filename_repo ) 377 ( my $rc, my @result ) = run_command( "cp -a $filename_prod $filename_repo" ); 378 if( $rc != 0 ) { 379 error( "failed to copy $filename_prod to repository: ", @result ); 380 } 381 382 # return success 383 return $rc == 0; 384 } 385 386 387 388 sub copy_file_from_repository_to_system( $ ) 389 { 390 my $filename = shift; 391 392 ( 393 my $basename, 394 my $dirname_prod, 395 my $dirname_repo, 396 my $filename_prod, 397 my $filename_repo 398 ) = get_filenames($filename); 399 400 ( my $rc, my @result ) = run_command( "cp -a $filename_repo $filename_prod" ); 401 if( $rc != 0 ) { 402 error( "failed to copy $filename_repo to $filename_prod: ", @result ); 403 } 404 405 # return success 406 return $rc == 0; 407 } 408 409 379 410 380 411 # … … 869 900 870 901 mkpath($dirname_repo); 871 872 # TODO: are permissions also copied? 873 copy( $filename_prod, $filename_repo ) 874 or error "failed to copy $filename_prod to repository: $!"; 902 copy_file_to_repository( $filename_prod ); 875 903 876 904 # already checked in? … … 1068 1096 mkpath("$real_path"); 1069 1097 } else { 1070 copy( $removedfiles{"$real_path"}, $real_path ) 1071 or error( "failed to copy " 1072 . $removedfiles{"$real_path"} . " to " 1073 . $real_path . ": " 1074 . $! ); 1098 copy_file_from_repository_to_system( $real_path ); 1075 1099 } 1076 1100 } … … 1083 1107 # copy files one by one from local repository to system 1084 1108 for my $real_file ( keys(%changedfiles) ) { 1085 copy ( $changedfiles{"$real_file"},$real_file );1109 copy_file_from_repository_to_system( $real_file ); 1086 1110 } 1087 1111
Note:
See TracChangeset
for help on using the changeset viewer.