Changeset 285 for trunk/dasscm


Ignore:
Timestamp:
Mar 9, 2009, 5:25:23 PM (15 years ago)
Author:
joergs
Message:

remove unknown files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dasscm/dasscm

    r284 r285  
    580580}
    581581
     582sub svn_remove_unknown_files( ;$ )
     583{
     584    my $path = shift || $DASSCM_REPO;
     585
     586    ( my $rc_update, my @result ) = run_command("$SVN status '$path'" );
     587
     588    if ( $rc_update != 0 ) {
     589        print "\n", @result;
     590        error("failed to receive subversion repository information");
     591    } else {
     592        foreach (@result) {
     593            if( s/^\? +// ) {
     594                chomp;
     595                # if file is unknown to subversion (line starts with "?")
     596                # remove it
     597                print "removing $_\n";
     598                unlink( $_ );
     599            }
     600        }
     601    }
     602}
     603
    582604sub getModifiedFiles( ;$ )
    583605{
     
    11761198
    11771199    svn_revert($DASSCM_REPO);
     1200    svn_remove_unknown_files($DASSCM_REPO);
    11781201}
    11791202
Note: See TracChangeset for help on using the changeset viewer.