1 |
commit: b2b4a679093ef53090421d89ac5458435a93eed5 |
2 |
Author: Kent Fredric <kentfredric <AT> gmail <DOT> com> |
3 |
AuthorDate: Wed Feb 29 12:15:15 2012 +0000 |
4 |
Commit: Kent Fredric <kentfredric <AT> gmail <DOT> com> |
5 |
CommitDate: Wed Feb 29 12:15:15 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/perl-overlay.git;a=commit;h=b2b4a679 |
7 |
|
8 |
add --from and --to timestamp range controls |
9 |
|
10 |
--- |
11 |
scripts/package_log.pl | 16 ++++++++++++---- |
12 |
1 files changed, 12 insertions(+), 4 deletions(-) |
13 |
|
14 |
diff --git a/scripts/package_log.pl b/scripts/package_log.pl |
15 |
index dc1a877..89d85e5 100755 |
16 |
--- a/scripts/package_log.pl |
17 |
+++ b/scripts/package_log.pl |
18 |
@@ -47,16 +47,24 @@ my $search = {}; |
19 |
|
20 |
my $and = []; |
21 |
|
22 |
+if ( $optparse->long_opts->{from} ) { |
23 |
+ $oldest_date = $optparse->long_opts->{from}; |
24 |
+} |
25 |
+my @to; |
26 |
+if ( my $ts = $optparse->long_opts->{to} ) { |
27 |
+ @to = ( to => $ts ); |
28 |
+} |
29 |
+ |
30 |
if ( not $optparse->long_opts->{all} ) { |
31 |
- push @{$and}, { |
32 |
+ push @{$and}, |
33 |
+ { |
34 |
range => { |
35 |
date => { |
36 |
from => $oldest_date, |
37 |
- |
38 |
- #to => $newest_date, |
39 |
+ @to, |
40 |
} |
41 |
} |
42 |
- }; |
43 |
+ }; |
44 |
} |
45 |
|
46 |
#my $or = []; |