maven-scm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r354424 - in /maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src: main/java/org/apache/maven/scm/provider/starteam/command/changelog/ test/java/org/apache/maven/scm/provider/starteam/command/changelog/
Date Tue, 06 Dec 2005 13:30:24 GMT
Author: evenisse
Date: Tue Dec  6 05:30:13 2005
New Revision: 354424

URL: http://svn.apache.org/viewcvs?rev=354424&view=rev
Log:
PR: SCM-99
Submitted by: Dan Tran

Fix changelog when using startDate is assigned.

Modified:
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/main/java/org/apache/maven/scm/provider/starteam/command/changelog/StarteamChangeLogCommand.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/changelog/StarteamChangeLogCommandTest.java

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/main/java/org/apache/maven/scm/provider/starteam/command/changelog/StarteamChangeLogCommand.java
URL: http://svn.apache.org/viewcvs/maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/main/java/org/apache/maven/scm/provider/starteam/command/changelog/StarteamChangeLogCommand.java?rev=354424&r1=354423&r2=354424&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/main/java/org/apache/maven/scm/provider/starteam/command/changelog/StarteamChangeLogCommand.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/main/java/org/apache/maven/scm/provider/starteam/command/changelog/StarteamChangeLogCommand.java
Tue Dec  6 05:30:13 2005
@@ -17,7 +17,6 @@
  */
 
 import java.io.File;
-import java.text.SimpleDateFormat;
 import java.util.Date;
 
 import org.apache.maven.scm.ScmException;
@@ -89,20 +88,26 @@
 
     public static Commandline createCommandLine( StarteamScmProviderRepository repo, File
workingDirectory, Date startDate )
     {
-        
-        SimpleDateFormat localFormat = new SimpleDateFormat();
-        
         Commandline cl = StarteamCommandLineUtils.createStarteamBaseCommandLine( "hist",
workingDirectory, repo );
 
         cl.createArgument().setValue( "-is" );
 
+        /**
+         * unfortunately the below option only gives the hist from view creation date to

+         * the specified date.  What good is that????? 
+         */
+        
+        /*
         if ( startDate != null )
         {
+            SimpleDateFormat localFormat = new SimpleDateFormat();
+        
             cl.createArgument().setValue( "-cfgd" );
 
             cl.createArgument().setValue( localFormat.format( startDate ).toString() );
         }
-
+        */
+        
         return cl;
     }
 }

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/changelog/StarteamChangeLogCommandTest.java
URL: http://svn.apache.org/viewcvs/maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/changelog/StarteamChangeLogCommandTest.java?rev=354424&r1=354423&r2=354424&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/changelog/StarteamChangeLogCommandTest.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/changelog/StarteamChangeLogCommandTest.java
Tue Dec  6 05:30:13 2005
@@ -17,8 +17,6 @@
  */
 
 import java.io.File;
-import java.text.SimpleDateFormat;
-import java.util.Date;
 
 import org.apache.maven.scm.ScmTestCase;
 import org.apache.maven.scm.provider.starteam.command.StarteamCommandLineUtils;
@@ -45,40 +43,34 @@
         testCommandLine( "scm:starteam:myusername:mypassword@myhost:1234/projecturl",
                          workDir,
                          "stcmd hist -x -nologo -stop -p myusername:mypassword@myhost:1234/projecturl
" +
-                         "-fp " + workDirAbsolutePath + " -is", null  );
+                         "-fp " + workDirAbsolutePath + " -is"  );
     }
 
     public void testGetCommandLineWithStartDate()
         throws Exception
     {
-        SimpleDateFormat localFormat = new SimpleDateFormat();
-        
-        Date startDate = new Date( 0 );
-        
 		File workDir = new File("target");
 
 		String workDirAbsolutePath = StarteamCommandLineUtils.toJavaPath( workDir.getAbsolutePath()
);
-
-        String startDateStr = localFormat.format( startDate ).toString();
         
         testCommandLine( "scm:starteam:myusername:mypassword@myhost:1234/projecturl",
                          workDir,
                          "stcmd hist -x -nologo -stop -p myusername:mypassword@myhost:1234/projecturl
" +
-                         "-fp " + workDirAbsolutePath + " -is -cfgd \"" + startDateStr +
"\"", startDate );
+                         "-fp " + workDirAbsolutePath + " -is");
     }
 
     // ----------------------------------------------------------------------
     //
     // ----------------------------------------------------------------------
 
-    private void testCommandLine( String scmUrl, File workDir, String commandLine, Date startDate
)
+    private void testCommandLine( String scmUrl, File workDir, String commandLine )
         throws Exception
     {
         ScmRepository repository = getScmManager().makeScmRepository( scmUrl );
 
         StarteamScmProviderRepository svnRepository = (StarteamScmProviderRepository) repository.getProviderRepository();
 
-        Commandline cl = StarteamChangeLogCommand.createCommandLine( svnRepository, workDir,
startDate );
+        Commandline cl = StarteamChangeLogCommand.createCommandLine( svnRepository, workDir,
null );
 
         assertEquals( commandLine, cl.toString() );
     }



Mime
View raw message