Subversion Repositories DevTools

Rev

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

Rev 3832 Rev 3859
Line 45... Line 45...
45
my $opt_ageorderUser;
45
my $opt_ageorderUser;
46
my $opt_reposort;
46
my $opt_reposort;
47
my $opt_onlyName;
47
my $opt_onlyName;
48
my $opt_onlyFullName;
48
my $opt_onlyFullName;
49
my $opt_touch;
49
my $opt_touch;
50
my $opt_available;
50
my @opt_available;
-
 
51
my @opt_exclude;
51
my $opt_all;
52
my $opt_all;
52
my $opt_protected;
53
my $opt_protected;
53
 
54
 
54
my %excludeRepos;
55
my %excludeRepos;
55
 
56
 
Line 76... Line 77...
76
                'byrepo'        => \$opt_reposort,
77
                'byrepo'        => \$opt_reposort,
77
                'byname'        => \$opt_onlyName,
78
                'byname'        => \$opt_onlyName,
78
                'byfullname'    => \$opt_onlyFullName,
79
                'byfullname'    => \$opt_onlyFullName,
79
                'svn'           => \$opt_svn,            # Include SVNed packages
80
                'svn'           => \$opt_svn,            # Include SVNed packages
80
                'touch:s'       => \$opt_touch,
81
                'touch:s'       => \$opt_touch,
81
                'available:s'   => \$opt_available,
82
                'available:s'   => \@opt_available,
-
 
83
                'exclude:s'     => \@opt_exclude,
82
                'all'           => \$opt_all,
84
                'all'           => \$opt_all,
83
                'protected'     => \$opt_protected,
85
                'protected'     => \$opt_protected,
84
 
86
 
85
                );
87
                );
86
 
88
 
Line 97... Line 99...
97
 
99
 
98
#
100
#
99
#   Sanity test
101
#   Sanity test
100
#
102
#
101
Error ("Touch path is not a directory") if ( defined $opt_touch && ! -d $opt_touch );
103
Error ("Touch path is not a directory") if ( defined $opt_touch && ! -d $opt_touch );
-
 
104
 
-
 
105
foreach ( @opt_available )
-
 
106
{
102
Error ("Available selector is not a directory") if ( defined $opt_available && ! -d $opt_available );
107
    Error ("Available selector is not a directory: $_")
-
 
108
        unless ( -d $_ );
-
 
109
}
-
 
110
 
-
 
111
foreach ( @opt_exclude )
-
 
112
{
-
 
113
    Error ("Exclude selector is not a directory: $_")
-
 
114
        unless ( -d $_ );
-
 
115
}
103
 
116
 
104
if ($opt_repoExclude)
117
if ($opt_repoExclude)
105
{
118
{
106
    foreach (split m/\s*,\s*/, $opt_repoExclude )
119
    foreach (split m/\s*,\s*/, $opt_repoExclude )
107
    {
120
    {
Line 166... Line 179...
166
            $keep = 0;
179
            $keep = 0;
167
            next;
180
            next;
168
        }
181
        }
169
    }
182
    }
170
 
183
 
-
 
184
    my $avFound = 2;
171
    if ( $opt_available )
185
    foreach my $basedir ( @opt_available )
-
 
186
    {
-
 
187
        if ( -f $basedir . '/' . $pkgname || -f $basedir . '/' . $pkgname . '.svg' )
-
 
188
        {
-
 
189
            $avFound = 1;
-
 
190
            last;
-
 
191
        }
-
 
192
        $avFound = 0;
-
 
193
    }
-
 
194
    unless ($avFound > 0)
-
 
195
    {
-
 
196
        $keep = 0;
-
 
197
        next;
-
 
198
    }
-
 
199
 
-
 
200
    foreach my $basedir ( @opt_exclude )
172
    {
201
    {
173
        unless ( -f $opt_available . '/' . $pkgname || -f $opt_available . '/' . $pkgname . '.svg' )
202
        if ( -f $basedir . '/' . $pkgname || -f $basedir . '/' . $pkgname . '.svg' )
174
        {
203
        {
175
            $keep = 0;
204
            $keep = 0;
176
            next;
205
            last;
177
        }
206
        }
178
    }
207
    }
-
 
208
    next unless($keep);
-
 
209
 
179
 
210
 
180
    if ( $opt_repo )
211
    if ( $opt_repo )
181
    {
212
    {
182
        unless ( $entry->{repo} =~ m~^$opt_repo($|/)~i )
213
        unless ( $entry->{repo} =~ m~^$opt_repo($|/)~i )
183
        {
214
        {
Line 285... Line 316...
285
    }
316
    }
286
 
317
 
287
    if ( $opt_touch )
318
    if ( $opt_touch )
288
    {
319
    {
289
        TouchFile( $opt_touch .'/'.$pkgname);
320
        TouchFile( $opt_touch .'/'.$pkgname);
-
 
321
        foreach my $basePath ( @opt_available )
-
 
322
        {
290
        unlink ($opt_available . '/' . $pkgname) if ( $opt_available );
323
            unlink ($basePath . '/' . $pkgname);
291
        unlink ($opt_available . '/' . $pkgname . '.svg') if ( $opt_available );
324
            unlink ($basePath . '/' . $pkgname . '.svg');
-
 
325
        }
292
    }
326
    }
293
}
327
}
294
print "Maching entires: $total\n";
328
print "Maching entires: $total\n";
295
 
329
 
296
#-------------------------------------------------------------------------------
330
#-------------------------------------------------------------------------------
Line 318... Line 352...
318
    -svn               - Include packages in SVN too
352
    -svn               - Include packages in SVN too
319
    -repo=name         - Select named repos (default all)
353
    -repo=name         - Select named repos (default all)
320
    -excludeRepo=name  - Exclude repos
354
    -excludeRepo=name  - Exclude repos
321
    -age=nn            - Select last build age > nn
355
    -age=nn            - Select last build age > nn
322
    -user=nn           - Select last user build age> nn
356
    -user=nn           - Select last user build age> nn
323
    -available=path    - Select if in named directory
357
    -available=path    - Select if in named directory. Allow Multiple.
-
 
358
    -exclude=path      - Exclude if in named directory. Allow Multiple.
324
    -all               - Include Protected and Broken packages
359
    -all               - Include Protected and Broken packages
325
    -protected         - Include Protected packages
360
    -protected         - Include Protected packages
326
   Output Sorting
361
   Output Sorting
327
    -byage             - Sort by last build age
362
    -byage             - Sort by last build age
328
    -byuser            - Sort by last User Mode age
363
    -byuser            - Sort by last User Mode age