[Libreoffice-commits] .: bin/cws-extract

Miklos Vajna vmiklos at kemper.freedesktop.org
Thu Feb 17 04:00:54 PST 2011


 bin/cws-extract |   16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

New commits:
commit 5c17d4ceceaba41b907c7b5e93c847356a3ea3e2
Author: Miklos Vajna <vmiklos at frugalware.org>
Date:   Thu Feb 17 12:53:33 2011 +0100

    cws-extract: make it work without CWS tools, which were removed
    
    Agreed-by: Tor Lillqvist <tlillqvist at novell.com>

diff --git a/bin/cws-extract b/bin/cws-extract
index 23234a8..9f6f955 100755
--- a/bin/cws-extract
+++ b/bin/cws-extract
@@ -11,6 +11,7 @@ Usage: cws-extract [-s] cws_name
   -w, --mws     Master Workspace name (defaults to $default_mws)
                 Use with care! Almost all CWSs are created for $default_mws.
                 They are cloned for branches by need.
+  -m		Milestone to diff against.
 
 Note: We need to create a full master checkout in current dir (or reuse one 
 already there).\n";
@@ -45,11 +46,10 @@ sub mws_checkout($$)
     }
 }
 
-sub cws_extract($$$)
+sub cws_extract($$$$)
 {
-    my ( $mws, $cws, $bundle ) = @_;
+    my ( $mws, $cws, $bundle, $milestone ) = @_;
 
-    my $milestone = `cws query -M $mws -c $cws current 2>> .log | tail -n 1`;
     $milestone =~ s/\n//g;
 
 	if (not -d $mws or not -d "$mws/.hg") {
@@ -112,6 +112,7 @@ if ( !defined( $ENV{'SOLARENV'} ) || $ENV{'SOLARENV'} eq '' ) {
 my $cws_name = "";
 my $mws = "";
 my $bundle = "";
+my $milestone = "";
 
 ( my $pwd = `pwd` ) =~ s/\n//;
 
@@ -127,6 +128,9 @@ while (@ARGV) {
     elsif ( $opt eq "-w" || $opt eq "--mws" ) {
         $mws = shift @ARGV;
     }
+    elsif ( $opt eq "-m" ) {
+        $milestone = shift @ARGV;
+    }
     else {
         $cws_name = $opt;
     }
@@ -136,9 +140,13 @@ if ( !defined( $cws_name ) || $cws_name eq "" ) {
     print STDERR "Please specify CWS.\n";
     exit 1;
 }
+if ( !defined( $milestone ) || $milestone eq "" ) {
+    print STDERR "Please specify milestone.\n";
+    exit 1;
+}
 if ( !defined( $mws ) || $mws eq "" ) {
     $mws = $default_mws;
     print "MWS:\t\tnot specified, assuming '$mws'\n";
 }
 
-cws_extract( $mws, $cws_name, $bundle );
+cws_extract( $mws, $cws_name, $bundle, $milestone );


More information about the Libreoffice-commits mailing list