[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdesdk/scripts
From:       Luís Pedro Coelho <luis () luispedro ! org>
Date:       2004-08-18 0:21:50
Message-ID: 20040818002150.E42139A68 () office ! kde ! org
[Download RAW message or body]

CVS commit by luis_pedro: 

1) adds a flag --local (or -l) which stops the scripts for
recursing. This is like cvs' -l flag.

2) Fixes a small bug. Before if you said cvscheck --missing that turned
--modified on as well because the regex "-m" matched. Now, exact matches are
required.


  M +11 -9     cvscheck   1.23


--- kdesdk/scripts/cvscheck  #1.22:1.23
@@ -63,4 +63,5 @@
 
 %showoptions = ();
+$optionlocal = 0;
 
 sub printinfo($)
@@ -212,5 +213,5 @@
         while( <ENTRIES> ) {
           if ( m#^\s*D/([^/]+)/# ) {
-               if (-d "$dir/$1") {
+               if (-d "$dir/$1" && !$optionlocal) {
                  push ( @dirqueue, "$dir/$1" );
                  $defaulttag{"$dir/$1"} = $standardtag;
@@ -338,11 +339,12 @@
 }
 foreach (@ARGV) {
-   $showoptions{"unknown"}++ if(/(?:-u|--unknown)/);
-   $showoptions{"modified"}++ if(/(?:-m|--modified)/);
-   $showoptions{"missing"}++ if(/(?:--missing)/);
-   $showoptions{"tagged"}++ if(/(?:-t|--tagged)/);
-   $showoptions{"added"}++ if(/(?:-a|--added)/);
-   $showoptions{"removed"}++ if(/(?:-r|--removed)/);
-   $showoptions{"conflicts"}++ if(/(?:-c|--conflicts)/);
+   $showoptions{"unknown"}++ if(/^(?:-u|--unknown)$/);
+   $showoptions{"modified"}++ if(/^(?:-m|--modified)$/);
+   $showoptions{"missing"}++ if(/^(?:--missing)$/);
+   $showoptions{"tagged"}++ if(/^(?:-t|--tagged)$/);
+   $showoptions{"added"}++ if(/^(?:-a|--added)$/);
+   $showoptions{"removed"}++ if(/^(?:-r|--removed)$/);
+   $showoptions{"conflicts"}++ if(/^(?:-c|--conflicts)$/);
+   $optionlocal++ if(/^(?:-l|--local)$/);
 
    next if (/^-/);
@@ -351,5 +353,5 @@
 
 # if no special flags set, show all files
-$showoptions{"all"}++ if ($#dirqueue == $#ARGV);
+$showoptions{"all"}++ if(scalar(keys(%showoptions)) == 0);
 
 # Try current directory if none specified


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic