From 1b9a274d7024a9c81ed620002dc0f6ed24a41b06 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 23 Jan 2012 01:27:46 +0000 Subject: [PATCH] some ---- comments --- tb-list.pl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tb-list.pl b/tb-list.pl index e1fea39..620f759 100755 --- a/tb-list.pl +++ b/tb-list.pl @@ -8,6 +8,8 @@ use strict; use Getopt::Long; use Topbloke; +#----- option parsing ----- + Getopt::Long::Configure(qw(bundling)); our $deleted=0; @@ -45,6 +47,8 @@ foreach $sort (@sort) { $relatedto = $relatedto ? parse_patch_spec($relatedto) : undef; +#----- list patches ----- + our %patches; foreach_patch($relatedto || $leaves || !$spec ? { } : $spec, @@ -56,6 +60,8 @@ foreach_patch($relatedto || $leaves || !$spec ? { } : $spec, $patches{$patch}{ParsedName} = $parsedname; }); +#----- selection ----- + if ($leaves) { foreach my $p (keys %patches) { my $v = $patches{$p}; @@ -102,6 +108,8 @@ foreach my $p (keys %patches) { push @output, $p; } +#----- sorting ----- + sub sortsub () { my $txt = "sub sort_cmp {\n my \$r;\n"; debug("@sort"); @@ -148,7 +156,7 @@ eval sortsub()." 1;" or die "$@ ?"; @output = sort sort_cmp @output; -use Data::Dumper; +#----- printing ----- my $current_branch = current_branch(); my $current_patch = $current_branch->{Kind} eq 'tip' -- 2.30.2