maven-scm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tryg...@apache.org
Subject cvs commit: maven-scm/maven-scm-providers/maven-scm-provider-cvs/src/test/java/org/apache/maven/scm/provider/cvslib/command/update CvsUpdateCommandTest.java
Date Fri, 29 Oct 2004 17:24:47 GMT
trygvis     2004/10/29 10:24:47

  Modified:    maven-scm-providers/maven-scm-provider-cvs/src/main/java/org/apache/maven/scm/provider/cvslib/command/update
                        CvsUpdateCommand.java
               maven-scm-providers/maven-scm-provider-cvs/src/test/java/org/apache/maven/scm/provider/cvslib/command/update
                        CvsUpdateCommandTest.java
  Log:
  o Making sure the command is executed in the correct working directory.
  
  Revision  Changes    Path
  1.4       +4 -3      maven-scm/maven-scm-providers/maven-scm-provider-cvs/src/main/java/org/apache/maven/scm/provider/cvslib/command/update/CvsUpdateCommand.java
  
  Index: CvsUpdateCommand.java
  ===================================================================
  RCS file: /home/cvs/maven-scm/maven-scm-providers/maven-scm-provider-cvs/src/main/java/org/apache/maven/scm/provider/cvslib/command/update/CvsUpdateCommand.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- CvsUpdateCommand.java	28 Oct 2004 13:06:21 -0000	1.3
  +++ CvsUpdateCommand.java	29 Oct 2004 17:24:47 -0000	1.4
  @@ -47,7 +47,7 @@
   
           cl.setExecutable( "cvs" );
   
  -        cl.setWorkingDirectory( new File( workingDirectory, repository.getModule() ).getAbsolutePath()
);
  +        cl.setWorkingDirectory( workingDirectory.getAbsolutePath() );
   
           cl.createArgument().setValue( "-q" );
   
  @@ -62,7 +62,8 @@
   
           CommandLineUtils.StringStreamConsumer stderr = new CommandLineUtils.StringStreamConsumer();
   
  -        getLogger().debug( "Executing: " + cl );
  +        getLogger().info( "Executing: " + cl );
  +        getLogger().info( "Working directory: " + cl.getWorkingDirectory().getAbsolutePath()
);
   
           int exitCode;
   
  
  
  
  1.4       +11 -9     maven-scm/maven-scm-providers/maven-scm-provider-cvs/src/test/java/org/apache/maven/scm/provider/cvslib/command/update/CvsUpdateCommandTest.java
  
  Index: CvsUpdateCommandTest.java
  ===================================================================
  RCS file: /home/cvs/maven-scm/maven-scm-providers/maven-scm-provider-cvs/src/test/java/org/apache/maven/scm/provider/cvslib/command/update/CvsUpdateCommandTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- CvsUpdateCommandTest.java	28 Oct 2004 13:06:23 -0000	1.3
  +++ CvsUpdateCommandTest.java	29 Oct 2004 17:24:47 -0000	1.4
  @@ -84,14 +84,16 @@
           String scmUrl = "scm:cvs:local:" + repository.getAbsolutePath() + ":" + getModule();
   
           // Check out the repo to a workding directory where files will be modified and
committed
  -        String arguments = "-d " + repository.getAbsolutePath() + " co " + getModule();
  +        String arguments = "-d " + repository.getAbsolutePath() + " " +
  +                           "co -d " + workingDirectory.getName() + " " + getModule();
   
  -        executeCVS( workingDirectory, arguments );
  +        executeCVS( workingDirectory.getParentFile(), arguments );
   
           // Check out the repo to a assertion directory where the command will be used
  -        arguments = "-d " + repository.getAbsolutePath() + " co " + getModule();
  +        arguments = "-d " + repository.getAbsolutePath() + " " +
  +                    "co -d " + assertionDirectory.getName() + " " + getModule();
   
  -        executeCVS( assertionDirectory, arguments );
  +        executeCVS( assertionDirectory.getParentFile(), arguments );
   
           // A new check out should return 0 updated files.
           ScmRepository scmRepository = scmManager.makeScmRepository( scmUrl );
  @@ -118,7 +120,7 @@
           assertEquals( 0, result.getUpdatedFiles().size() );
   
           // Modifing a file
  -        File fooJava = new File( workingDirectory, "test-repo/update/Foo.java" );
  +        File fooJava = new File( workingDirectory, "Foo.java" );
   
           String content = FileUtils.fileRead( fooJava );
   
  @@ -130,15 +132,15 @@
           writer.close();
   
           // Adding a new file
  -        writer = new FileWriter( new File( workingDirectory, "test-repo/update/New.txt"
) );
  +        writer = new FileWriter( new File( workingDirectory, "New.txt" ) );
   
           writer.write( "new file" );
   
           writer.close();
   
  -        arguments = "-d " + repository.getAbsolutePath() + " add update/New.txt";
  +        arguments = "-d " + repository.getAbsolutePath() + " add New.txt";
   
  -        executeCVS( new File( workingDirectory, "test-repo" ), arguments );
  +        executeCVS( workingDirectory, arguments );
   
           // Committing
           arguments = "-d " + repository.getAbsolutePath() + " commit -m .";
  
  
  

Mime
View raw message