Return-Path: Mailing-List: contact derby-commits-help@db.apache.org; run by ezmlm Delivered-To: mailing list derby-commits@db.apache.org Received: (qmail 89301 invoked by uid 500); 6 Oct 2004 20:29:58 -0000 Delivered-To: apmail-incubator-derby-cvs@incubator.apache.org Received: (qmail 89296 invoked by uid 99); 6 Oct 2004 20:29:58 -0000 X-ASF-Spam-Status: No, hits=-10.0 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Wed, 06 Oct 2004 13:29:58 -0700 Received: (qmail 88274 invoked by uid 65534); 6 Oct 2004 20:29:57 -0000 Date: 6 Oct 2004 20:29:57 -0000 Message-ID: <20041006202957.88271.qmail@minotaur.apache.org> From: bandaram@apache.org To: derby-cvs@incubator.apache.org Subject: svn commit: rev 53903 - in incubator/derby/code/trunk/java/tools/org/apache/derby: loc tools X-Virus-Checked: Checked Author: bandaram Date: Wed Oct 6 13:29:56 2004 New Revision: 53903 Modified: incubator/derby/code/trunk/java/tools/org/apache/derby/loc/toolsmessages.properties incubator/derby/code/trunk/java/tools/org/apache/derby/tools/dblook.java Log: Commit Jalud's dblook argument handling fix Modified: incubator/derby/code/trunk/java/tools/org/apache/derby/loc/toolsmessages.properties ============================================================================== --- incubator/derby/code/trunk/java/tools/org/apache/derby/loc/toolsmessages.properties (original) +++ incubator/derby/code/trunk/java/tools/org/apache/derby/loc/toolsmessages.properties Wed Oct 6 13:29:56 2004 @@ -181,7 +181,7 @@ \ USAGE:\n\ java org.apache.derby.tools.dblook -d [OPTIONS]\n\n\ \ \twhere the source URL is the full URL, including the connection protocol\n\ \ \tand any connection attributes that might apply. For example, use\n\ -\ \t'jdbc:cloudscape:myDB', or 'jdbc:cloudscape:net://localhost:1527/myDB:user=usr;'. \n\n\ +\ \t'jdbc:derby:myDB', or 'jdbc:derby:net://localhost:1527/myDB:user=usr;'. \n\n\ \ \toptions include: \n\n\ \ \t-z to specify a schema to which the DDL generation\n\ \ \t should be limited. Only database objects with that schema will have\n\ @@ -199,19 +199,29 @@ \ \t will be written.\n\ \ \t\tIf not specified, default is the console.\ \ \n -CSLOOK_FileCreation=This file was created using Cloudscape's cslook utility. +CSLOOK_FileCreation=This file was created using Derby's dblook utility. CSLOOK_OutputLocation=Output will be sent to file {0}\n CSLOOK_Timestamp=Timestamp: {0} CSLOOK_DBName=Source database is: {0} CSLOOK_DBUrl=Connection URL is: {0} -CSLOOK_TargetTables=The cslook utility will consider only specified tables. +CSLOOK_TargetTables=The dblook utility will consider only specified tables. CSLOOK_TargetSchema=Specified schema is: {0} # Directory com/ibm/db2j/tools/cslookImpl/... -CSLOOK_Header=DDL Statements for {0} +CSLOOK_TablesHeader=DDL Statements for tables +CSLOOK_ChecksHeader=DDL Statements for checks +CSLOOK_IndexesHeader=DDL Statements for indexes +CSLOOK_JarsHeader=DDL Statements for jars +CSLOOK_KeysHeader=DDL Statements for keys +CSLOOK_PrimUniqueHeader=primary/unique +CSLOOK_ForeignHeader=foreign +CSLOOK_SchemasHeader=DDL Statements for schemas +CSLOOK_StoredProcHeader=DDL Statements for stored procedures +CSLOOK_TriggersHeader=DDL Statements for triggers +CSLOOK_ViewsHeader=DDL Statements for views CSLOOK_Jar_Note=\ **** NOTE **** In order for jar files to be loaded correctly,\n\ -- you must either 1) ensure that the CSJARS directory (created\n\ --- automatically by cslook) exists where it was created (i.e. at\n\ +-- automatically by dblook) exists where it was created (i.e. at\n\ -- the path shown in the statements below), or else 2) change the\n\ -- path in the statements below to reflect the current location of\n\ -- CSJARS. If the CSJARS directory does not exist, or if it\n\ @@ -222,6 +232,6 @@ CSLOOK_DefaultSchema=Reverting back to default schema 'APP' CSLOOK_AtLeastOneDebug=\ -- Note: At least one unexpected error/warning message was\n\ --- encountered during DDL generation. See cslook.log\n\ +-- encountered during DDL generation. See dblook.log\n\ -- to review the message(s).\n\ \n Modified: incubator/derby/code/trunk/java/tools/org/apache/derby/tools/dblook.java ============================================================================== --- incubator/derby/code/trunk/java/tools/org/apache/derby/tools/dblook.java (original) +++ incubator/derby/code/trunk/java/tools/org/apache/derby/tools/dblook.java Wed Oct 6 13:29:56 2004 @@ -231,16 +231,20 @@ case 'd': if (!haveVal) return -1; - if (args[start].length() == 2) - sourceDBUrl = args[++start]; - return start; + if (args[start].length() == 2) { + sourceDBUrl = stripQuotes(args[++start]); + return start; + } + return -1; case 'z': if (!haveVal) return -1; - if (args[start].length() == 2) + if (args[start].length() == 2) { schemaParam = args[++start]; - return start; + return start; + } + return -1; case 't': if (!haveVal) @@ -256,9 +260,11 @@ case 'o': if (!haveVal) return -1; - if ((args[start].length() == 2) && (args[start+1].length() > 0)) + if ((args[start].length() == 2) && (args[start+1].length() > 0)){ ddlFileName = args[++start]; - return start; + return start; + } + return -1; case 'a': if (args[start].equals("-append")) { @@ -342,9 +348,9 @@ start = dbUrl.indexOf("net://"); if (start == -1) // standard url (jdbc:derby:). Database - // name starts right after "cloudscape:". The "11" in - // the following line is the length of "cloudscape:". - start = dbUrl.indexOf("cloudscape:") + 11; + // name starts right after "derby:". The "6" in + // the following line is the length of "derby:". + start = dbUrl.indexOf("derby:") + 6; else // Network Server url. Database name starts right // after next slash (":net://hostname:port/).