use Getopt::Long;
use Topbloke;
+#----- option parsing -----
+
Getopt::Long::Configure(qw(bundling));
our $deleted=0;
$relatedto = $relatedto ? parse_patch_spec($relatedto) : undef;
+#----- list patches -----
+
our %patches;
foreach_patch($relatedto || $leaves || !$spec ? { } : $spec,
$patches{$patch}{ParsedName} = $parsedname;
});
+#----- selection -----
+
if ($leaves) {
foreach my $p (keys %patches) {
my $v = $patches{$p};
push @output, $p;
}
+#----- sorting -----
+
sub sortsub () {
my $txt = "sub sort_cmp {\n my \$r;\n";
debug("@sort");
@output = sort sort_cmp @output;
-use Data::Dumper;
+#----- printing -----
my $current_branch = current_branch();
my $current_patch = $current_branch->{Kind} eq 'tip'