From kde-commits Wed Aug 18 00:21:50 2004 From: =?utf-8?q?Lu=C3=ADs=20Pedro=20Coelho?= Date: Wed, 18 Aug 2004 00:21:50 +0000 To: kde-commits Subject: kdesdk/scripts Message-Id: <20040818002150.E42139A68 () office ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=109278851926277 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( ) { 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