chiark / gitweb /
some ---- comments
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 23 Jan 2012 01:27:46 +0000 (01:27 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 23 Jan 2012 01:27:46 +0000 (01:27 +0000)
tb-list.pl

index e1fea3981c919b894943e03a36492730a8131025..620f7599650aec3b2baff315263728ab8ea12f87 100755 (executable)
@@ -8,6 +8,8 @@ use strict;
 use Getopt::Long;
 use Topbloke;
 
 use Getopt::Long;
 use Topbloke;
 
+#----- option parsing -----
+
 Getopt::Long::Configure(qw(bundling));
 
 our $deleted=0;
 Getopt::Long::Configure(qw(bundling));
 
 our $deleted=0;
@@ -45,6 +47,8 @@ foreach $sort (@sort) {
 
 $relatedto = $relatedto ? parse_patch_spec($relatedto) : undef;
 
 
 $relatedto = $relatedto ? parse_patch_spec($relatedto) : undef;
 
+#----- list patches -----
+
 our %patches;
 
 foreach_patch($relatedto || $leaves || !$spec ? { } : $spec, 
 our %patches;
 
 foreach_patch($relatedto || $leaves || !$spec ? { } : $spec, 
@@ -56,6 +60,8 @@ foreach_patch($relatedto || $leaves || !$spec ? { } : $spec,
                  $patches{$patch}{ParsedName} = $parsedname;
              });
 
                  $patches{$patch}{ParsedName} = $parsedname;
              });
 
+#----- selection -----
+
 if ($leaves) {
     foreach my $p (keys %patches) {
        my $v = $patches{$p};
 if ($leaves) {
     foreach my $p (keys %patches) {
        my $v = $patches{$p};
@@ -102,6 +108,8 @@ foreach my $p (keys %patches) {
     push @output, $p;
 }
 
     push @output, $p;
 }
 
+#----- sorting -----
+
 sub sortsub () {
     my $txt = "sub sort_cmp {\n    my \$r;\n";
     debug("@sort");
 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;
 
 
 @output = sort sort_cmp @output;
 
-use Data::Dumper;
+#----- printing -----
 
 my $current_branch = current_branch();
 my $current_patch = $current_branch->{Kind} eq 'tip'
 
 my $current_branch = current_branch();
 my $current_patch = $current_branch->{Kind} eq 'tip'