2 # usage: tb-list [<patch-spec>]
3 # lists all patches matching <patch-spec> and other criteria
11 Getopt::Long::Configure(qw(bundling));
20 GetOptions("d|deleted!" => \$deleted, # including deleted patches
21 "deleted-only!" => \$deleted_only, # only deleted patches
22 "r|related=s" => \$related, # only patches related to this one
23 "l|last|leaf|leaves" => \$leaves, # only leaf patches
25 ) or die "bad options\n";
30 $spec = parse_patch_spec($ARGV[0]);
33 die "too many arguments\n";
36 our @sort = grep { /./ } split m/,/, $sort;
37 push @sort, $spec ? 'created' : 'topo';
38 foreach $sort (@sort) {
39 die "bad sort $sort\n" unless grep { $_ eq $sort }
40 qw(fullname created nick topo);
45 foreach_patch($spec, $deleted || $deleted_only, [], sub {