commit-womb
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-womb] gnumaint gnumaint


From: Jose E. Marchesi
Subject: [Commit-womb] gnumaint gnumaint
Date: Wed, 30 Aug 2006 17:39:47 -0000

CVSROOT:        /cvsroot/womb
Module name:    gnumaint
Changes by:     Jose E. Marchesi <jemarch>      06/08/30 17:39:45

Modified files:
        .              : gnumaint 

Log message:
        Listing features improved

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnumaint/gnumaint?cvsroot=womb&r1=1.1.1.1&r2=1.2

Patches:
Index: gnumaint
===================================================================
RCS file: /cvsroot/womb/gnumaint/gnumaint,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -b -r1.1.1.1 -r1.2
--- gnumaint    30 Aug 2006 00:31:22 -0000      1.1.1.1
+++ gnumaint    30 Aug 2006 17:39:45 -0000      1.2
@@ -229,7 +229,7 @@
 
 proc do_help_list {} {
 
-    puts "list - list information about GNU maintainers on the screen"
+    puts "gnumaint list - list information about GNU maintainers on the screen"
     puts "Usage:"
     puts {}
     puts "  gnumaint list TOPIC \[ARGS\]..."
@@ -246,8 +246,9 @@
     puts "  maintainers \[ARG\] - list information about GNU maintainers"
     puts "     all (or no argument)"
     puts "       list all the maintainers"
-    puts "     PACKAGE-NAME"
-    puts "       list the maintainers of PACKAGE-NAME"
+    puts "     PACKAGE-NAME-GLOB"
+    puts "       list the maintainers of PACKAGE-NAME, that is a GLOB 
expression (such as \"*emacs*\""
+    puts "       note that this search is case-insensitive"
     puts {}
 }
 
@@ -289,11 +290,11 @@
 
        packages {
            
-           if {[llength $opargs] == 1} then {
+           if {[llength $opargs] == 2} then {
 
                do_list_packages all
 
-           }
+           } else {
            switch [lindex $opargs 2] {
 
                all {
@@ -310,10 +311,10 @@
                }
            }
        }
-
+       }
        maintainers {
 
-           if {[llength $opargs] == 1} then {
+           if {[llength $opargs] == 2} then {
                
                do_list_maintainers all
            }
@@ -336,6 +337,36 @@
     }
 }
 
+proc do_list_maintainers {which} {
+
+    global maintainersdb
+
+    set listed_maintainer {}
+
+    foreach pkg $maintainersdb {
+
+       foreach maintainer [lindex $pkg 1] {
+
+           if {($which == "all") ||
+               ([lsearch -exact $listed_maintainer $which] == -1)} then {
+               ;# List this maintainer
+               puts -nonewline [lindex $maintainer 0]
+               if {[lindex $maintainer 1] != ""} then {
+                   puts -nonewline " "
+                   puts -nonewline "<[lindex $maintainer 1]>"
+               }
+               foreach note [lindex $maintainer 2] {
+                   puts -nonewline " "
+                   puts -nonewline "($note)"
+               }
+               puts {}
+
+               lappend listed_maintainer [lindex $maintainer 0]
+           }
+       }
+    }
+}
+
 proc do_list_maintainers_package {package_name} {
 
     global maintainersdb
@@ -347,20 +378,17 @@
            # List the maintainers for this package                           
            foreach maintainer [lindex $pkg 1] {                              
                
-               set maintainer_name [lindex $maintainer 0]                      
  
-               set maintainer_email [lindex $maintainer 1]                     
  
-               set maintainer_notes [lindex $maintainer 2]                     
  
-               
-               puts -nonewline $maintainer_name                                
  
+               ;# List this maintainer
+               puts -nonewline [lindex $maintainer 0]
+               if {[lindex $maintainer 1] != ""} then {
                puts -nonewline " "                                             
  
-               puts -nonewline $maintainer_email                               
  
-               
-               if {$maintainer_notes != {}} then {                             
  
+                   puts -nonewline "<[lindex $maintainer 1]>"
+               }
+               foreach note [lindex $maintainer 2] {
                    puts -nonewline " "                                         
  
-                   puts $maintainer_notes                                      
  
-               } else {                                                        
  
-                   puts {}                                                     
  
+                   puts -nonewline "($note)"
                }                                                               
  
+               puts {}
            }                                                                 
        }                                                                     
     }
@@ -372,10 +400,13 @@
 
     foreach pkg $maintainersdb {
 
+       set maintainers [lindex $pkg 1]
+       set first_maintainer_name [lindex [lindex $maintainers 0] 0]
+
        if {(($which == "maintained") && 
-            ([lindex $pkg 2] == {})) ||
+            ($first_maintainer_name == "Unmaintained")) ||
            (($which == "unmaintained") &&
-            ([lindex $pkg 2] != {}))} then {
+            ($first_maintainer_name != "Unmaintained"))} then {
 
            continue
        }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]