Subversion Repositories DevTools

Rev

Rev 2882 | Rev 3890 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2882 Rev 3263
Line 786... Line 786...
786
        foreach my $file ( @rm_files  )
786
        foreach my $file ( @rm_files  )
787
        {
787
        {
788
            #
788
            #
789
            #   Detect items that are to be retained
789
            #   Detect items that are to be retained
790
            #   Do not delete items that are a part of a top level path that
790
            #   Do not delete items that are a part of a top level path that
791
            #   is not present in the New Import
791
            #   are not present in the New Import
792
            #
792
            #
793
            if ( $opt_mergePaths )
793
            if ( $opt_mergePaths )
794
            {
794
            {
795
                my $keep = 0;
795
                my $keep = 0;
796
                foreach ( @newTldPaths )
796
                foreach ( @newTldPaths )
Line 800... Line 800...
800
                        Verbose("Not deleting: $file");
800
                        Verbose("Not deleting: $file");
801
                        $keep = 1;
801
                        $keep = 1;
802
                        last;
802
                        last;
803
                    }
803
                    }
804
                }
804
                }
-
 
805
 
-
 
806
                #
-
 
807
                #   Examine $opt_mergPaths and process entries that look like
-
 
808
                #       build/**  -> keep the directory and every think under it
-
 
809
                #
-
 
810
                foreach ( split(',', $opt_mergePaths) )
-
 
811
                {
-
 
812
                    if ( m~(.+/)\*\*$~ )
-
 
813
                    {
-
 
814
                        my $base = $1;
-
 
815
                        if ( $file =~ m~^$base~ )
-
 
816
                        {
-
 
817
                            Verbose("Not deleting: $file");
-
 
818
                            $keep = 1;
-
 
819
                            last;
-
 
820
                        }
-
 
821
                    }
-
 
822
                }
-
 
823
                
805
                next if ($keep);
824
                next if ($keep);
806
            }
825
            }
807
 
826
 
808
            Verbose ("Removing $file");
827
            Verbose ("Removing $file");
809
            $filesDeleted++ unless ( $file =~ m~/$~ );
828
            $filesDeleted++ unless ( $file =~ m~/$~ );
Line 846... Line 865...
846
        foreach my $file ( @added  )
865
        foreach my $file ( @added  )
847
        {
866
        {
848
            #
867
            #
849
            #   Detect items that are to be merged
868
            #   Detect items that are to be merged
850
            #   Only specified top level paths are to be imported
869
            #   Only specified top level paths are to be imported
-
 
870
            #   Special mergePath names
-
 
871
            #       ++              - All files and directories
-
 
872
            #       +               - All files in the root
-
 
873
            #       path/**         - Keep all items under path
-
 
874
            #       Otherwise       - name of a directory
851
            #
875
            #
852
            if ( $opt_mergePaths )
876
            if ( $opt_mergePaths )
853
            {
877
            {
854
                my $discard = 1;
878
                my $discard = 1;
855
                foreach ( split(',', $opt_mergePaths) )
879
                foreach ( split(',', $opt_mergePaths) )
856
                {
880
                {
-
 
881
                    next if ( m ~\*\*$~ );
857
                    if ( $_ eq '+' )
882
                    if ( $_ eq '++' )
-
 
883
                    {
-
 
884
                        $discard = 0;
-
 
885
                        last;
-
 
886
                    }
-
 
887
                    elsif ( $_ eq '+' )
858
                    {
888
                    {
859
                        if ( ($file =~ tr~/~/~) eq 0 )
889
                        if ( ($file =~ tr~/~/~) eq 0 )
860
                        {
890
                        {
861
                            $discard = 0;
891
                            $discard = 0;
862
                            last;
892
                            last;