maven-scm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject cvs commit: maven-scm/scm-providers/svn/src/test/java/org/apache/maven/scm/provider/svn/command/update SvnUpdateCommandTest.java
Date Tue, 27 Apr 2004 14:12:14 GMT
evenisse    2004/04/27 07:12:14

  Modified:    scm-api/src/main/java/org/apache/maven/scm/util
                        Commandline.java
               scm-api/src/test/java/org/apache/maven/scm/util
                        CommandlineTest.java
               scm-providers/clearcase/src/test/java/org/apache/maven/scm/provider/clearcase/command/changelog
                        ClearcaseChangeLogCommandTest.java
               scm-providers/clearcase/src/test/java/org/apache/maven/scm/provider/clearcase/command/checkout
                        ClearcaseCheckOutCommandTest.java
               scm-providers/cvslib/src/test/java/org/apache/maven/scm/provider/cvslib/command/changelog
                        CvsChangeLogCommandTest.java
               scm-providers/cvslib/src/test/java/org/apache/maven/scm/provider/cvslib/command/checkout
                        CvsCheckoutCommandTest.java
               scm-providers/cvslib/src/test/java/org/apache/maven/scm/provider/cvslib/command/tag
                        CvsTagCommandTest.java
               scm-providers/cvslib/src/test/java/org/apache/maven/scm/provider/cvslib/command/update
                        CvsUpdateCommandTest.java
               scm-providers/perforce/src/test/java/org/apache/maven/scm/provider/perforce/command/changelog
                        PerforceChangeLogCommandTest.java
               scm-providers/starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/changelog
                        StarteamChangeLogCommandTest.java
               scm-providers/starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/checkout
                        StarteamCheckOutCommandTest.java
               scm-providers/svn/src/test/java/org/apache/maven/scm/provider/svn/command/changelog
                        SvnChangeLogCommandTest.java
               scm-providers/svn/src/test/java/org/apache/maven/scm/provider/svn/command/checkout
                        SvnCheckOutCommandTest.java
               scm-providers/svn/src/test/java/org/apache/maven/scm/provider/svn/command/update
                        SvnUpdateCommandTest.java
  Log:
  SCM-8. Fix command line failure for windows lesser than win XP.
  
  Revision  Changes    Path
  1.2       +81 -8     maven-scm/scm-api/src/main/java/org/apache/maven/scm/util/Commandline.java
  
  Index: Commandline.java
  ===================================================================
  RCS file: /home/cvs/maven-scm/scm-api/src/main/java/org/apache/maven/scm/util/Commandline.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Commandline.java	20 Apr 2004 19:05:51 -0000	1.1
  +++ Commandline.java	27 Apr 2004 14:12:13 -0000	1.2
  @@ -57,6 +57,7 @@
   import java.io.File;
   import java.io.IOException;
   import java.util.StringTokenizer;
  +import java.util.Enumeration;
   import java.util.Vector;
   
   import org.apache.maven.scm.ScmException;
  @@ -85,13 +86,20 @@
    */
   public class Commandline implements Cloneable
   {
  -    private Vector arguments = new Vector();
  +    
  +    protected static final String OS_NAME = "os.name";
  +    protected static final String WINDOWS = "Windows";
  +
  +    private String shell = null;
  +    private Vector shellArgs = new Vector();
       private String executable = null;
  +    private Vector arguments = new Vector();
       private File workingDir = null;
   
       public Commandline( String toProcess )
       {
           super();
  +        setDefaultShell();
           String[] tmp = new String[0];
           try
           {
  @@ -114,6 +122,7 @@
       public Commandline()
       {
           super();
  +        setDefaultShell();
       }
   
       /**
  @@ -213,6 +222,53 @@
           }
       }
   
  +
  +    /**
  +     * <p>Sets the shell or command-line interpretor for the detected operating system,

  +     * and the shell arguments.</p>
  +     */
  +    private void setDefaultShell() {
  +        String os = System.getProperty(OS_NAME);
  +        
  +        //If this is windows set the shell to command.com or cmd.exe with correct arguments.

  +        if ( os.indexOf(WINDOWS) != -1 )
  +        {
  +            if (os.indexOf("95") != -1 || os.indexOf("98") != -1 || os.indexOf("Me") !=
-1) 
  +            {
  +                shell = "COMMAND.COM";
  +                shellArgs.add("/C"); 
  +            }
  +            else
  +            {
  +                shell = "CMD.EXE";
  +                shellArgs.add("/X");
  +                shellArgs.add("/C");
  +            }
  +        }
  +    }
  +    
  +    /**
  +     * <p>Gets the shell or command-line interpretor for the detected operating system,

  +     * and the shell arguments.</p>
  +     */
  +    public String getDefaultShell()
  +    {
  +        if ( shell != null )
  +        {
  +            String args = "";
  +            for (Enumeration enum = shellArgs.elements(); enum.hasMoreElements(); )
  +            {
  +                args += (String)enum.nextElement() + " ";
  +            }
  +            
  +            return shell + " " + args;
  +        }
  +        else
  +        {
  +            return "";
  +        }
  +    }
  +    
       /**
        * Creates an argument object.
        *
  @@ -278,18 +334,35 @@
       }
   
       /**
  -     * Returns the executable and all defined arguments.
  +     * Returns the shell, executable and all defined arguments.
        */
       public String[] getCommandline()
       {
  -        final String[] args = getArguments();
  -        if ( executable == null )
  +        int shellCount = 0;
  +        int arrayPos = 0;
  +        if ( shell != null )
  +        {
  +            shellCount = 1;
  +        }
  +        shellCount += shellArgs.size();
  +        final String[] args = getArguments();        
  +        
  +        String[] result = new String[shellCount + args.length + (( executable == null )?
0:1)];
  +        //Build shell and arguments into result
  +        if ( shell != null )
  +        {
  +            result[0] = shell;
  +            arrayPos++;
  +        }
  +        System.arraycopy( shellArgs.toArray(), 0, result, arrayPos, shellArgs.size() );
  +        arrayPos += shellArgs.size();
  +        //Build excutable and arguments into result
  +        if ( executable != null )
           {
  -            return args;
  +            result[arrayPos] = executable;
  +            arrayPos++;
           }
  -        final String[] result = new String[args.length + 1];
  -        result[0] = executable;
  -        System.arraycopy( args, 0, result, 1, args.length );
  +        System.arraycopy( args, 0, result, arrayPos, args.length );
           return result;
       }
   
  
  
  
  1.2       +19 -6     maven-scm/scm-api/src/test/java/org/apache/maven/scm/util/CommandlineTest.java
  
  Index: CommandlineTest.java
  ===================================================================
  RCS file: /home/cvs/maven-scm/scm-api/src/test/java/org/apache/maven/scm/util/CommandlineTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CommandlineTest.java	20 Apr 2004 19:05:52 -0000	1.1
  +++ CommandlineTest.java	27 Apr 2004 14:12:13 -0000	1.2
  @@ -24,6 +24,7 @@
   public class CommandlineTest extends TestCase
   {
       private String baseDir;
  +    private String shellStringValue = "";
       
       /**
        * @param testName
  @@ -41,6 +42,18 @@
           super.setUp();
           baseDir = System.getProperty("basedir");
           assertNotNull("The system property basedir was not defined.", baseDir);
  +        
  +        //Set the shell string to assert against
  +        Commandline cmd = new Commandline();
  +        shellStringValue = cmd.toString() + ((cmd.toString().length() > 0)? " ":"");
  +
  +        //Validate cmd.exe or command.com for windows
  +        if ( System.getProperty( "os.name" ).indexOf( "Windows" ) > -1 )
  +        {
  +            int shellPosition = cmd.toString().indexOf( "CMD.EXE" );
  +            shellPosition += cmd.toString().indexOf( "COMMAND.COM" );
  +            assertTrue( shellPosition > -2 );
  +        }
       }
       
       public void testCommandlineWithoutArgumentInConstructor()
  @@ -51,7 +64,7 @@
               cmd.setWorkingDirectory(baseDir);
               cmd.createArgument().setValue("cd");
               cmd.createArgument().setValue(".");
  -            assertEquals("cd .", cmd.toString());
  +            assertEquals(shellStringValue + "cd .", cmd.toString());
           }
           catch(Exception e)
           {
  @@ -65,7 +78,7 @@
           {
               Commandline cmd = new Commandline("cd .");
               cmd.setWorkingDirectory(baseDir);
  -            assertEquals("cd .", cmd.toString());
  +            assertEquals(shellStringValue + "cd .", cmd.toString());
           }
           catch(Exception e)
           {
  @@ -82,7 +95,7 @@
               cmd.setExecutable("echo");
               assertEquals("echo", cmd.getExecutable());
               cmd.createArgument().setValue("Hello");
  -            assertEquals("echo Hello", cmd.toString());
  +            assertEquals(shellStringValue + "echo Hello", cmd.toString());
               cmd.execute();
           }
           catch(Exception e)
  @@ -100,7 +113,7 @@
               cmd.setExecutable("echo");
               cmd.createArgument().setLine(null);
               cmd.createArgument().setLine("Hello");
  -            assertEquals("echo Hello", cmd.toString());
  +            assertEquals(shellStringValue + "echo Hello", cmd.toString());
           }
           catch(Exception e)
           {
  @@ -116,7 +129,7 @@
               cmd.setWorkingDirectory(baseDir);
               cmd.createArgument().setValue(".");
               cmd.createArgument(true).setValue("cd");
  -            assertEquals("cd .", cmd.toString());
  +            assertEquals(shellStringValue + "cd .", cmd.toString());
           }
           catch(Exception e)
           {
  @@ -133,7 +146,7 @@
               cmd.createArgument().setValue("more");
               File f = new File("test.txt");
               cmd.createArgument().setFile(f);
  -            assertEquals("more "+f.getAbsoluteFile(), cmd.toString());
  +            assertEquals(shellStringValue + "more "+f.getAbsoluteFile(), cmd.toString());
           }
           catch(Exception e)
           {
  
  
  
  1.2       +3 -3      maven-scm/scm-providers/clearcase/src/test/java/org/apache/maven/scm/provider/clearcase/command/changelog/ClearcaseChangeLogCommandTest.java
  
  Index: ClearcaseChangeLogCommandTest.java
  ===================================================================
  RCS file: /home/cvs/maven-scm/scm-providers/clearcase/src/test/java/org/apache/maven/scm/provider/clearcase/command/changelog/ClearcaseChangeLogCommandTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ClearcaseChangeLogCommandTest.java	20 Apr 2004 19:05:53 -0000	1.1
  +++ ClearcaseChangeLogCommandTest.java	27 Apr 2004 14:12:13 -0000	1.2
  @@ -64,7 +64,7 @@
               Commandline cl = instance.getCommandLine();
               System.out.println(cl.toString());
               assertEquals(
  -                "cleartool lshistory -fmt \"NAME:%En\\nDATE:%Nd\\nCOMM:%-12.12o - %o -
%c - Activity: %[activity]p\\nUSER:%-8.8u\\n\" -recurse -nco",
  +                cl.getDefaultShell()+"cleartool lshistory -fmt \"NAME:%En\\nDATE:%Nd\\nCOMM:%-12.12o
- %o - %c - Activity: %[activity]p\\nUSER:%-8.8u\\n\" -recurse -nco",
                   cl.toString());
           }
           catch(Exception e)
  @@ -82,7 +82,7 @@
               Commandline cl = instance.getCommandLine();
               System.out.println(cl.toString());
               assertEquals(
  -                "cleartool lshistory -fmt \"NAME:%En\\nDATE:%Nd\\nCOMM:%-12.12o - %o -
%c - Activity: %[activity]p\\nUSER:%-8.8u\\n\" -recurse -nco -branch myBranch",
  +                cl.getDefaultShell()+"cleartool lshistory -fmt \"NAME:%En\\nDATE:%Nd\\nCOMM:%-12.12o
- %o - %c - Activity: %[activity]p\\nUSER:%-8.8u\\n\" -recurse -nco -branch myBranch",
                   cl.toString());
           }
           catch(Exception e)
  
  
  
  1.2       +3 -3      maven-scm/scm-providers/clearcase/src/test/java/org/apache/maven/scm/provider/clearcase/command/checkout/ClearcaseCheckOutCommandTest.java
  
  Index: ClearcaseCheckOutCommandTest.java
  ===================================================================
  RCS file: /home/cvs/maven-scm/scm-providers/clearcase/src/test/java/org/apache/maven/scm/provider/clearcase/command/checkout/ClearcaseCheckOutCommandTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ClearcaseCheckOutCommandTest.java	20 Apr 2004 19:05:53 -0000	1.1
  +++ ClearcaseCheckOutCommandTest.java	27 Apr 2004 14:12:13 -0000	1.2
  @@ -87,7 +87,7 @@
               Commandline cl = cmd.getCommandLine();
               System.out.println(cl.toString());
               assertEquals(
  -                "cleartool co -branch myBranch",
  +                cl.getDefaultShell()+"cleartool co -branch myBranch",
                   cl.toString());
           }
           catch(ScmException e)
  @@ -103,7 +103,7 @@
               Commandline cl = cmd.getCommandLine();
               System.out.println(cl.toString());
               assertEquals(
  -                "cleartool co",
  +                cl.getDefaultShell()+"cleartool co",
                   cl.toString());
           }
           catch(ScmException e)
  
  
  
  1.2       +4 -4      maven-scm/scm-providers/cvslib/src/test/java/org/apache/maven/scm/provider/cvslib/command/changelog/CvsChangeLogCommandTest.java
  
  Index: CvsChangeLogCommandTest.java
  ===================================================================
  RCS file: /home/cvs/maven-scm/scm-providers/cvslib/src/test/java/org/apache/maven/scm/provider/cvslib/command/changelog/CvsChangeLogCommandTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CvsChangeLogCommandTest.java	20 Apr 2004 19:05:55 -0000	1.1
  +++ CvsChangeLogCommandTest.java	27 Apr 2004 14:12:13 -0000	1.2
  @@ -71,7 +71,7 @@
               Commandline cl = instance.getCommandLine();
               System.out.println(cl.toString());
               assertEquals(
  -                "cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic -q log -d2003-09-10<2003-10-10",
  +                cl.getDefaultShell()+"cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic
-q log -d2003-09-10<2003-10-10",
                   cl.toString());
           }
           catch (Exception e)
  @@ -96,7 +96,7 @@
   			Commandline cl = instance.getCommandLine();
   			System.out.println(cl.toString());
   			assertEquals(
  -				"cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic -q log -d>2003-09-10",
  +				cl.getDefaultShell()+"cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic -q log
-d>2003-09-10",
   				cl.toString());
   		}
   		catch (Exception e)
  @@ -118,7 +118,7 @@
   			Commandline cl = instance.getCommandLine();
   			System.out.println(cl.toString());
   			assertEquals(
  -				"cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic -q log -rbranchName",
  +				cl.getDefaultShell()+"cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic -q log
-rbranchName",
   				cl.toString());
   		}
   		catch (Exception e)
  
  
  
  1.2       +3 -3      maven-scm/scm-providers/cvslib/src/test/java/org/apache/maven/scm/provider/cvslib/command/checkout/CvsCheckoutCommandTest.java
  
  Index: CvsCheckoutCommandTest.java
  ===================================================================
  RCS file: /home/cvs/maven-scm/scm-providers/cvslib/src/test/java/org/apache/maven/scm/provider/cvslib/command/checkout/CvsCheckoutCommandTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CvsCheckoutCommandTest.java	20 Apr 2004 19:05:55 -0000	1.1
  +++ CvsCheckoutCommandTest.java	27 Apr 2004 14:12:13 -0000	1.2
  @@ -67,7 +67,7 @@
               Commandline cl = instance.getCommandLine();
               System.out.println(cl.toString());
               assertEquals(
  -                "cvs -d :pserver:anonymous@cvs.codehaus.org:/scm/cvspublic -q checkout
test-repo",
  +                cl.getDefaultShell()+"cvs -d :pserver:anonymous@cvs.codehaus.org:/scm/cvspublic
-q checkout test-repo",
                   cl.toString());
   
               String workingDir = baseDir + "/target/testrepo/cvslib/checkout/";
  @@ -105,7 +105,7 @@
               Commandline cl = instance.getCommandLine();
               System.out.println(cl.toString());
               assertEquals(
  -                "cvs -d :pserver:anonymous@cvs.codehaus.org:/scm/cvspublic -q checkout
-rmyTag test-repo",
  +                cl.getDefaultShell()+"cvs -d :pserver:anonymous@cvs.codehaus.org:/scm/cvspublic
-q checkout -rmyTag test-repo",
                   cl.toString());
           }
           catch(ScmException e)
  
  
  
  1.2       +2 -2      maven-scm/scm-providers/cvslib/src/test/java/org/apache/maven/scm/provider/cvslib/command/tag/CvsTagCommandTest.java
  
  Index: CvsTagCommandTest.java
  ===================================================================
  RCS file: /home/cvs/maven-scm/scm-providers/cvslib/src/test/java/org/apache/maven/scm/provider/cvslib/command/tag/CvsTagCommandTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CvsTagCommandTest.java	20 Apr 2004 19:05:55 -0000	1.1
  +++ CvsTagCommandTest.java	27 Apr 2004 14:12:13 -0000	1.2
  @@ -66,7 +66,7 @@
               Commandline cl = instance.getCommandLine();
               System.out.println(cl.toString());
               assertEquals(
  -                "cvs -d :pserver:anonymous@cvs.codehaus.org:/scm/cvspublic -q tag -c my_tag",
  +                cl.getDefaultShell()+"cvs -d :pserver:anonymous@cvs.codehaus.org:/scm/cvspublic
-q tag -c my_tag",
                   cl.toString());
           }
           catch (Exception e)
  
  
  
  1.2       +3 -3      maven-scm/scm-providers/cvslib/src/test/java/org/apache/maven/scm/provider/cvslib/command/update/CvsUpdateCommandTest.java
  
  Index: CvsUpdateCommandTest.java
  ===================================================================
  RCS file: /home/cvs/maven-scm/scm-providers/cvslib/src/test/java/org/apache/maven/scm/provider/cvslib/command/update/CvsUpdateCommandTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CvsUpdateCommandTest.java	20 Apr 2004 19:05:55 -0000	1.1
  +++ CvsUpdateCommandTest.java	27 Apr 2004 14:12:14 -0000	1.2
  @@ -86,7 +86,7 @@
               Commandline cl = instance.getCommandLine();
               System.out.println(cl.toString());
               assertEquals(
  -                "cvs -d :pserver:anonymous@cvs.codehaus.org:/scm/cvspublic -q update test-repo",
  +                cl.getDefaultShell()+"cvs -d :pserver:anonymous@cvs.codehaus.org:/scm/cvspublic
-q update test-repo",
                   cl.toString());
   
               instance.setWorkingDirectory(workingDir);
  @@ -118,7 +118,7 @@
               Commandline cl = instance.getCommandLine();
               System.out.println(cl.toString());
               assertEquals(
  -                "cvs -d :pserver:anonymous@cvs.codehaus.org:/scm/cvspublic -q update -rmyTag
test-repo",
  +                cl.getDefaultShell()+"cvs -d :pserver:anonymous@cvs.codehaus.org:/scm/cvspublic
-q update -rmyTag test-repo",
                   cl.toString());
           }
           catch (Exception e)
  
  
  
  1.2       +3 -3      maven-scm/scm-providers/perforce/src/test/java/org/apache/maven/scm/provider/perforce/command/changelog/PerforceChangeLogCommandTest.java
  
  Index: PerforceChangeLogCommandTest.java
  ===================================================================
  RCS file: /home/cvs/maven-scm/scm-providers/perforce/src/test/java/org/apache/maven/scm/provider/perforce/command/changelog/PerforceChangeLogCommandTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PerforceChangeLogCommandTest.java	20 Apr 2004 19:05:57 -0000	1.1
  +++ PerforceChangeLogCommandTest.java	27 Apr 2004 14:12:14 -0000	1.2
  @@ -64,7 +64,7 @@
               Commandline cl = instance.getCommandLine();
               System.out.println(cl.toString());
               assertEquals(
  -                "p4 filelog -tl //depot/projects/pathname",
  +                cl.getDefaultShell()+"p4 filelog -tl //depot/projects/pathname",
                   cl.toString());
           }
           catch(Exception e)
  @@ -84,7 +84,7 @@
               Commandline cl = instance.getCommandLine();
               System.out.println(cl.toString());
               assertEquals(
  -                "p4 -p myhost:1234 -u username -P myPassword filelog -tl //depot/projects/pathname",
  +                cl.getDefaultShell()+"p4 -p myhost:1234 -u username -P myPassword filelog
-tl //depot/projects/pathname",
                   cl.toString());
           }
           catch(Exception e)
  
  
  
  1.2       +4 -4      maven-scm/scm-providers/starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/changelog/StarteamChangeLogCommandTest.java
  
  Index: StarteamChangeLogCommandTest.java
  ===================================================================
  RCS file: /home/cvs/maven-scm/scm-providers/starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/changelog/StarteamChangeLogCommandTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- StarteamChangeLogCommandTest.java	20 Apr 2004 19:05:59 -0000	1.1
  +++ StarteamChangeLogCommandTest.java	27 Apr 2004 14:12:14 -0000	1.2
  @@ -64,7 +64,7 @@
               Commandline cl = instance.getCommandLine();
               System.out.println(cl.toString());
               assertEquals(
  -                "stcmd hist -x -nologo -is -p myusername:mypassword@myhost:1234/projecturl",
  +                cl.getDefaultShell()+"stcmd hist -x -nologo -is -p myusername:mypassword@myhost:1234/projecturl",
                   cl.toString());
           }
           catch(Exception e)
  @@ -81,7 +81,7 @@
               Commandline cl = instance.getCommandLine();
               System.out.println(cl.toString());
               assertEquals(
  -                "stcmd hist -x -nologo -is -p myusername:mypassword@myhost:1234/projecturl
-vl myTag",
  +                cl.getDefaultShell()+"stcmd hist -x -nologo -is -p myusername:mypassword@myhost:1234/projecturl
-vl myTag",
                   cl.toString());
           }
           catch(Exception e)
  @@ -157,4 +157,4 @@
           {
           }
       }
  -}
  \ No newline at end of file
  +}
  
  
  
  1.2       +3 -3      maven-scm/scm-providers/starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/checkout/StarteamCheckOutCommandTest.java
  
  Index: StarteamCheckOutCommandTest.java
  ===================================================================
  RCS file: /home/cvs/maven-scm/scm-providers/starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/checkout/StarteamCheckOutCommandTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- StarteamCheckOutCommandTest.java	20 Apr 2004 19:05:59 -0000	1.1
  +++ StarteamCheckOutCommandTest.java	27 Apr 2004 14:12:14 -0000	1.2
  @@ -90,7 +90,7 @@
               Commandline cl = cmd.getCommandLine();
               System.out.println(cl.toString());
               assertEquals(
  -                "stcmd co -x -nologo -is -p myusername:mypassword@myhost:1234/projecturl
-vl myTag",
  +                cl.getDefaultShell()+"stcmd co -x -nologo -is -p myusername:mypassword@myhost:1234/projecturl
-vl myTag",
                   cl.toString());
           }
           catch(ScmException e)
  @@ -106,7 +106,7 @@
               Commandline cl = cmd.getCommandLine();
               System.out.println(cl.toString());
               assertEquals(
  -                "stcmd co -x -nologo -is -p myusername:mypassword@myhost:1234/projecturl",
  +                cl.getDefaultShell()+"stcmd co -x -nologo -is -p myusername:mypassword@myhost:1234/projecturl",
                   cl.toString());
           }
           catch(ScmException e)
  
  
  
  1.2       +5 -5      maven-scm/scm-providers/svn/src/test/java/org/apache/maven/scm/provider/svn/command/changelog/SvnChangeLogCommandTest.java
  
  Index: SvnChangeLogCommandTest.java
  ===================================================================
  RCS file: /home/cvs/maven-scm/scm-providers/svn/src/test/java/org/apache/maven/scm/provider/svn/command/changelog/SvnChangeLogCommandTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SvnChangeLogCommandTest.java	20 Apr 2004 19:06:00 -0000	1.1
  +++ SvnChangeLogCommandTest.java	27 Apr 2004 14:12:14 -0000	1.2
  @@ -71,7 +71,7 @@
               Commandline cl = instance.getCommandLine();
               System.out.println(cl.toString());
               assertEquals(
  -                "svn log --non-interactive -v -r \"{2003/09/10 GMT}:{2003/10/10 GMT}\"
http://foo.com/svn/trunk",
  +                cl.getDefaultShell()+"svn log --non-interactive -v -r \"{2003/09/10 GMT}:{2003/10/10
GMT}\" http://foo.com/svn/trunk",
                   cl.toString());
           }
           catch (Exception e)
  @@ -95,7 +95,7 @@
               Commandline cl = instance.getCommandLine();
               System.out.println(cl.toString());
               assertEquals(
  -                "svn log --non-interactive -v -r \"{2003/09/10 GMT}:HEAD\" http://foo.com/svn/trunk",
  +                cl.getDefaultShell()+"svn log --non-interactive -v -r \"{2003/09/10 GMT}:HEAD\"
http://foo.com/svn/trunk",
                   cl.toString());
           }
           catch (Exception e)
  @@ -118,7 +118,7 @@
               Commandline cl = instance.getCommandLine();
               System.out.println(cl.toString());
               assertEquals(
  -                "svn log --non-interactive -v -r 3 --username anonymous --password passwd
http://foo.com/svn/trunk",
  +                cl.getDefaultShell()+"svn log --non-interactive -v -r 3 --username anonymous
--password passwd http://foo.com/svn/trunk",
                   cl.toString());
           }
           catch (Exception e)
  @@ -140,7 +140,7 @@
               Commandline cl = instance.getCommandLine();
               System.out.println(cl.toString());
               assertEquals(
  -                "svn log --non-interactive -v --username anonymous --password passwd http://foo.com/svn/trunk",
  +                cl.getDefaultShell()+"svn log --non-interactive -v --username anonymous
--password passwd http://foo.com/svn/trunk",
                   cl.toString());
           }
           catch (Exception e)
  
  
  
  1.2       +3 -3      maven-scm/scm-providers/svn/src/test/java/org/apache/maven/scm/provider/svn/command/checkout/SvnCheckOutCommandTest.java
  
  Index: SvnCheckOutCommandTest.java
  ===================================================================
  RCS file: /home/cvs/maven-scm/scm-providers/svn/src/test/java/org/apache/maven/scm/provider/svn/command/checkout/SvnCheckOutCommandTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SvnCheckOutCommandTest.java	20 Apr 2004 19:06:00 -0000	1.1
  +++ SvnCheckOutCommandTest.java	27 Apr 2004 14:12:14 -0000	1.2
  @@ -62,7 +62,7 @@
               Commandline cl = instance.getCommandLine();
               System.out.println(cl.toString());
               assertEquals(
  -                "svn checkout --non-interactive -v -r 10 --username anonymous --password
passwd http://foo.com/svn/trunk",
  +                cl.getDefaultShell()+"svn checkout --non-interactive -v -r 10 --username
anonymous --password passwd http://foo.com/svn/trunk",
                   cl.toString());
           }
           catch (Exception e)
  @@ -83,7 +83,7 @@
               Commandline cl = instance.getCommandLine();
               System.out.println(cl.toString());
               assertEquals(
  -                "svn checkout --non-interactive -v http://foo.com/svn/trunk",
  +                cl.getDefaultShell()+"svn checkout --non-interactive -v http://foo.com/svn/trunk",
                   cl.toString());
           }
           catch (Exception e)
  
  
  
  1.2       +3 -3      maven-scm/scm-providers/svn/src/test/java/org/apache/maven/scm/provider/svn/command/update/SvnUpdateCommandTest.java
  
  Index: SvnUpdateCommandTest.java
  ===================================================================
  RCS file: /home/cvs/maven-scm/scm-providers/svn/src/test/java/org/apache/maven/scm/provider/svn/command/update/SvnUpdateCommandTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SvnUpdateCommandTest.java	20 Apr 2004 19:06:00 -0000	1.1
  +++ SvnUpdateCommandTest.java	27 Apr 2004 14:12:14 -0000	1.2
  @@ -62,7 +62,7 @@
               Commandline cl = instance.getCommandLine();
               System.out.println(cl.toString());
               assertEquals(
  -                "svn update --non-interactive -v -r 10 --username anonymous --password
passwd http://foo.com/svn/trunk",
  +                cl.getDefaultShell()+"svn update --non-interactive -v -r 10 --username
anonymous --password passwd http://foo.com/svn/trunk",
                   cl.toString());
           }
           catch (Exception e)
  @@ -83,7 +83,7 @@
               Commandline cl = instance.getCommandLine();
               System.out.println(cl.toString());
               assertEquals(
  -                "svn update --non-interactive -v http://foo.com/svn/trunk",
  +                cl.getDefaultShell()+"svn update --non-interactive -v http://foo.com/svn/trunk",
                   cl.toString());
           }
           catch (Exception e)
  
  
  

Mime
View raw message