maven-scm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dant...@apache.org
Subject svn commit: r478248 - in /maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/provider: AbstractScmProvider.java ScmProvider.java
Date Wed, 22 Nov 2006 17:25:34 GMT
Author: dantran
Date: Wed Nov 22 09:25:32 2006
New Revision: 478248

URL: http://svn.apache.org/viewvc?view=rev&rev=478248
Log:
SCM-254: create one more add interface to  support a comment message argument

Modified:
    maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/provider/AbstractScmProvider.java
    maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/provider/ScmProvider.java

Modified: maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/provider/AbstractScmProvider.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/provider/AbstractScmProvider.java?view=diff&rev=478248&r1=478247&r2=478248
==============================================================================
--- maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/provider/AbstractScmProvider.java
(original)
+++ maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/provider/AbstractScmProvider.java
Wed Nov 22 09:25:32 2006
@@ -114,12 +114,21 @@
     public AddScmResult add( ScmRepository repository, ScmFileSet fileSet )
         throws ScmException
     {
+        return add( repository, fileSet, (String) null );
+    }
+    
+    
+    /**
+     * @see org.apache.maven.scm.provider.ScmProvider#add(org.apache.maven.scm.repository.ScmRepository,
org.apache.maven.scm.ScmFileSet, String message )
+     */
+    public AddScmResult add( ScmRepository repository, ScmFileSet fileSet, String message
)
+        throws ScmException
+    {
         login( repository, fileSet );
 
         CommandParameters parameters = new CommandParameters();
 
-        // TODO: is message reasonable?
-        parameters.setString( CommandParameter.MESSAGE, "" );
+        parameters.setString( CommandParameter.MESSAGE, message == null ? "" : message );
 
         // TODO: binary may be dependant on particular files though
         // TODO: set boolean?

Modified: maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/provider/ScmProvider.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/provider/ScmProvider.java?view=diff&rev=478248&r1=478247&r2=478248
==============================================================================
--- maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/provider/ScmProvider.java
(original)
+++ maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/provider/ScmProvider.java
Wed Nov 22 09:25:32 2006
@@ -94,6 +94,19 @@
      */
     AddScmResult add( ScmRepository repository, ScmFileSet fileSet )
         throws ScmException;
+    
+    /**
+     * Adds the given files to the source control system
+     *
+     * @param repository the source control system
+     * @param fileSet    the files to be added
+     * @param message a string that is a comment on the new added file
+     * @return an {@link AddScmResult} that contains the files that have been added
+     * @throws ScmException
+     */
+    AddScmResult add( ScmRepository repository, ScmFileSet fileSet, String message )
+        throws ScmException;
+    
 
     /**
      * Returns the changes that have happend in the source control system in a certain period
of time.



Mime
View raw message