You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm-commits@maven.apache.org by ev...@apache.org on 2007/04/03 18:05:33 UTC
svn commit: r525193 - in
/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm:
manager/AbstractScmManager.java manager/ScmManager.java
provider/AbstractScmProvider.java provider/ScmProvider.java
Author: evenisse
Date: Tue Apr 3 09:05:32 2007
New Revision: 525193
URL: http://svn.apache.org/viewvc?view=rev&rev=525193
Log:
Add more command methods
Modified:
maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/manager/AbstractScmManager.java
maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/manager/ScmManager.java
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/manager/AbstractScmManager.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/manager/AbstractScmManager.java?view=diff&rev=525193&r1=525192&r2=525193
==============================================================================
--- maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/manager/AbstractScmManager.java (original)
+++ maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/manager/AbstractScmManager.java Tue Apr 3 09:05:32 2007
@@ -346,6 +346,15 @@
/**
*
*/
+ public CheckInScmResult checkIn( ScmRepository repository, ScmFileSet fileSet, String message )
+ throws ScmException
+ {
+ return this.getProviderByRepository( repository ).checkIn( repository, fileSet, message );
+ }
+
+ /**
+ *
+ */
public CheckInScmResult checkIn( ScmRepository repository, ScmFileSet fileSet, ScmVersion revision, String message )
throws ScmException
{
@@ -355,6 +364,15 @@
/**
*
*/
+ public CheckOutScmResult checkOut( ScmRepository repository, ScmFileSet fileSet )
+ throws ScmException
+ {
+ return this.getProviderByRepository( repository ).checkOut( repository, fileSet );
+ }
+
+ /**
+ *
+ */
public CheckOutScmResult checkOut( ScmRepository repository, ScmFileSet fileSet, ScmVersion version )
throws ScmException
{
@@ -364,6 +382,15 @@
/**
*
*/
+ public CheckOutScmResult checkOut( ScmRepository repository, ScmFileSet fileSet, boolean recursive )
+ throws ScmException
+ {
+ return this.getProviderByRepository( repository ).checkOut( repository, fileSet, recursive );
+ }
+
+ /**
+ *
+ */
public CheckOutScmResult checkOut( ScmRepository repository, ScmFileSet fileSet, ScmVersion version,
boolean recursive )
throws ScmException
@@ -393,6 +420,15 @@
/**
*
*/
+ public ExportScmResult export( ScmRepository repository, ScmFileSet fileSet )
+ throws ScmException
+ {
+ return this.getProviderByRepository( repository ).export( repository, fileSet );
+ }
+
+ /**
+ *
+ */
public ExportScmResult export( ScmRepository repository, ScmFileSet fileSet, ScmVersion version )
throws ScmException
{
@@ -402,6 +438,16 @@
/**
*
*/
+ public ExportScmResult export( ScmRepository repository, ScmFileSet fileSet, String outputDirectory )
+ throws ScmException
+ {
+ return this.getProviderByRepository( repository ).export( repository, fileSet, (ScmVersion) null,
+ outputDirectory );
+ }
+
+ /**
+ *
+ */
public ExportScmResult export( ScmRepository repository, ScmFileSet fileSet, ScmVersion version,
String outputDirectory )
throws ScmException
@@ -457,10 +503,28 @@
/**
*
*/
+ public UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet )
+ throws ScmException
+ {
+ return this.getProviderByRepository( repository ).update( repository, fileSet );
+ }
+
+ /**
+ *
+ */
public UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, ScmVersion version )
throws ScmException
{
return this.getProviderByRepository( repository ).update( repository, fileSet, version );
+ }
+
+ /**
+ *
+ */
+ public UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, boolean runChangelog )
+ throws ScmException
+ {
+ return this.getProviderByRepository( repository ).update( repository, fileSet, runChangelog );
}
/**
Modified: maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/manager/ScmManager.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/manager/ScmManager.java?view=diff&rev=525193&r1=525192&r2=525193
==============================================================================
--- maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/manager/ScmManager.java (original)
+++ maven/scm/trunk/maven-scm-api/src/main/java/org/apache/maven/scm/manager/ScmManager.java Tue Apr 3 09:05:32 2007
@@ -203,6 +203,23 @@
*
* @param repository the source control system
* @param fileSet the files to check in (sometimes called commit)
+ * @param message a string that is a comment on the changes that where done
+ * @return
+ * @throws ScmException
+ */
+ CheckInScmResult checkIn( ScmRepository repository, ScmFileSet fileSet, String message )
+ throws ScmException;
+
+ /**
+ * Save the changes you have done into the repository. This will create a new version of the file or
+ * directory in the repository.
+ * <p/>
+ * When the fileSet has no entries, the fileSet.getBaseDir() is recursively committed.
+ * When the fileSet has entries, the commit is non-recursive and only the elements in the fileSet
+ * are committed.
+ *
+ * @param repository the source control system
+ * @param fileSet the files to check in (sometimes called commit)
* @param revision branch/tag/revision
* @param message a string that is a comment on the changes that where done
* @return
@@ -216,6 +233,17 @@
*
* @param repository the source control system
* @param fileSet the files are copied to the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} location
+ * @return
+ * @throws ScmException
+ */
+ CheckOutScmResult checkOut( ScmRepository repository, ScmFileSet fileSet )
+ throws ScmException;
+
+ /**
+ * Create a copy of the repository on your local machine
+ *
+ * @param repository the source control system
+ * @param fileSet the files are copied to the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} location
* @param version get the version defined by the revision, branch or tag
* @return
* @throws ScmException
@@ -228,6 +256,18 @@
*
* @param scmRepository the source control system
* @param scmFileSet the files are copied to the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} location
+ * @param recursive whether to check out recursively
+ * @return
+ * @throws ScmException
+ */
+ CheckOutScmResult checkOut( ScmRepository scmRepository, ScmFileSet scmFileSet, boolean recursive )
+ throws ScmException;
+
+ /**
+ * Create a copy of the repository on your local machine.
+ *
+ * @param scmRepository the source control system
+ * @param scmFileSet the files are copied to the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} location
* @param version get the version defined by the revision, branch or tag
* @param recursive whether to check out recursively
* @return
@@ -269,6 +309,17 @@
*
* @param repository the source control system
* @param fileSet the files are copied to the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} location
+ * @return
+ * @throws ScmException
+ */
+ ExportScmResult export( ScmRepository repository, ScmFileSet fileSet )
+ throws ScmException;
+
+ /**
+ * Create an exported copy of the repository on your local machine
+ *
+ * @param repository the source control system
+ * @param fileSet the files are copied to the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} location
* @param version get the version defined by the branch/tag/revision
* @return
* @throws ScmException
@@ -281,6 +332,18 @@
*
* @param repository the source control system
* @param fileSet the files are copied to the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} location
+ * @param outputDirectory the directory where the export will be stored
+ * @return
+ * @throws ScmException
+ */
+ ExportScmResult export( ScmRepository repository, ScmFileSet fileSet, String outputDirectory )
+ throws ScmException;
+
+ /**
+ * Create an exported copy of the repository on your local machine
+ *
+ * @param repository the source control system
+ * @param fileSet the files are copied to the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} location
* @param version get the version defined by the branch/tag/revision
* @param outputDirectory the directory where the export will be stored
* @return
@@ -356,11 +419,34 @@
*
* @param repository the source control system
* @param fileSet location of your local copy
+ * @return
+ * @throws ScmException
+ */
+ UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet )
+ throws ScmException;
+
+ /**
+ * Updates the copy on the local machine with the changes in the repository
+ *
+ * @param repository the source control system
+ * @param fileSet location of your local copy
* @param version use the version defined by the branch/tag/revision
* @return
* @throws ScmException
*/
UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, ScmVersion version )
+ throws ScmException;
+
+ /**
+ * Updates the copy on the local machine with the changes in the repository
+ *
+ * @param repository the source control system
+ * @param fileSet location of your local copy
+ * @param runChangelog Run the changelog command after the update
+ * @return
+ * @throws ScmException
+ */
+ UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, boolean runChangelog )
throws ScmException;
/**
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=525193&r1=525192&r2=525193
==============================================================================
--- 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 Tue Apr 3 09:05:32 2007
@@ -302,6 +302,15 @@
}
/**
+ * @see org.apache.maven.scm.provider.ScmProvider#checkIn(org.apache.maven.scm.repository.ScmRepository,org.apache.maven.scm.ScmFileSet,java.lang.String)
+ */
+ public CheckInScmResult checkIn( ScmRepository repository, ScmFileSet fileSet, String message )
+ throws ScmException
+ {
+ return checkIn( repository, fileSet, (ScmVersion) null, message );
+ }
+
+ /**
* @see org.apache.maven.scm.provider.ScmProvider#checkIn(org.apache.maven.scm.repository.ScmRepository,org.apache.maven.scm.ScmFileSet,ScmVersion,java.lang.String)
*/
public CheckInScmResult checkIn( ScmRepository repository, ScmFileSet fileSet, ScmVersion scmVersion,
@@ -354,12 +363,30 @@
}
/**
- * @see org.apache.maven.scm.provider.ScmProvider#checkOut(org.apache.maven.scm.repository.ScmRepository,org.apache.maven.scm.ScmFileSet,java.lang.String)
+ * @see org.apache.maven.scm.provider.ScmProvider#checkOut(org.apache.maven.scm.repository.ScmRepository,org.apache.maven.scm.ScmFileSet)
+ */
+ public CheckOutScmResult checkOut( ScmRepository repository, ScmFileSet fileSet )
+ throws ScmException
+ {
+ return checkOut( repository, fileSet, (ScmVersion) null, true );
+ }
+
+ /**
+ * @see org.apache.maven.scm.provider.ScmProvider#checkOut(org.apache.maven.scm.repository.ScmRepository,org.apache.maven.scm.ScmFileSet,ScmVersion)
*/
public CheckOutScmResult checkOut( ScmRepository repository, ScmFileSet fileSet, ScmVersion scmVersion )
throws ScmException
{
- return checkOut( repository, fileSet, scmVersion, true );
+ return checkOut( repository, fileSet, true );
+ }
+
+ /**
+ * @see org.apache.maven.scm.provider.ScmProvider#checkOut(org.apache.maven.scm.repository.ScmRepository,org.apache.maven.scm.ScmFileSet,boolean)
+ */
+ public CheckOutScmResult checkOut( ScmRepository repository, ScmFileSet fileSet, boolean recursive )
+ throws ScmException
+ {
+ return checkOut( repository, fileSet, (ScmVersion) null, recursive );
}
/**
@@ -483,6 +510,15 @@
}
/**
+ * @see org.apache.maven.scm.provider.ScmProvider#export(org.apache.maven.scm.repository.ScmRepository,org.apache.maven.scm.ScmFileSet)
+ */
+ public ExportScmResult export( ScmRepository repository, ScmFileSet fileSet )
+ throws ScmException
+ {
+ return export( repository, fileSet, (ScmVersion) null, null );
+ }
+
+ /**
* @see org.apache.maven.scm.provider.ScmProvider#export(org.apache.maven.scm.repository.ScmRepository,org.apache.maven.scm.ScmFileSet,ScmVersion)
*/
public ExportScmResult export( ScmRepository repository, ScmFileSet fileSet, ScmVersion scmVersion )
@@ -691,12 +727,30 @@
}
/**
+ * @see org.apache.maven.scm.provider.ScmProvider#update(org.apache.maven.scm.repository.ScmRepository,org.apache.maven.scm.ScmFileSet)
+ */
+ public UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet )
+ throws ScmException
+ {
+ return update( repository, fileSet, (ScmVersion) null, true );
+ }
+
+ /**
* @see org.apache.maven.scm.provider.ScmProvider#update(org.apache.maven.scm.repository.ScmRepository,org.apache.maven.scm.ScmFileSet,ScmVersion)
*/
public UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, ScmVersion scmVersion )
throws ScmException
{
return update( repository, fileSet, scmVersion, true );
+ }
+
+ /**
+ * @see org.apache.maven.scm.provider.ScmProvider#update(org.apache.maven.scm.repository.ScmRepository,org.apache.maven.scm.ScmFileSet,boolean)
+ */
+ public UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, boolean runChangelog )
+ throws ScmException
+ {
+ return update( repository, fileSet, (ScmVersion) null, "", runChangelog );
}
/**
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=525193&r1=525192&r2=525193
==============================================================================
--- 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 Tue Apr 3 09:05:32 2007
@@ -297,6 +297,23 @@
*
* @param repository the source control system
* @param fileSet the files to check in (sometimes called commit)
+ * @param message a string that is a comment on the changes that where done
+ * @return
+ * @throws ScmException
+ */
+ CheckInScmResult checkIn( ScmRepository repository, ScmFileSet fileSet, String message )
+ throws ScmException;
+
+ /**
+ * Save the changes you have done into the repository. This will create a new version of the file or
+ * directory in the repository.
+ * <p/>
+ * When the fileSet has no entries, the fileSet.getBaseDir() is recursively committed.
+ * When the fileSet has entries, the commit is non-recursive and only the elements in the fileSet
+ * are committed.
+ *
+ * @param repository the source control system
+ * @param fileSet the files to check in (sometimes called commit)
* @param revision branch/tag/revision
* @param message a string that is a comment on the changes that where done
* @return
@@ -323,6 +340,17 @@
*
* @param repository the source control system
* @param fileSet the files are copied to the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} location
+ * @return
+ * @throws ScmException
+ */
+ CheckOutScmResult checkOut( ScmRepository repository, ScmFileSet fileSet )
+ throws ScmException;
+
+ /**
+ * Create a copy of the repository on your local machine
+ *
+ * @param repository the source control system
+ * @param fileSet the files are copied to the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} location
* @param version get the version defined by the revision, branch or tag
* @return
* @throws ScmException
@@ -349,6 +377,18 @@
*
* @param scmRepository the source control system
* @param scmFileSet the files are copied to the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} location
+ * @param recursive whether to check out recursively
+ * @return
+ * @throws ScmException
+ */
+ CheckOutScmResult checkOut( ScmRepository scmRepository, ScmFileSet scmFileSet, boolean recursive )
+ throws ScmException;
+
+ /**
+ * Create a copy of the repository on your local machine.
+ *
+ * @param scmRepository the source control system
+ * @param scmFileSet the files are copied to the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} location
* @param version get the version defined by the revision, branch or tag
* @param recursive whether to check out recursively
* @return
@@ -404,6 +444,17 @@
*
* @param repository the source control system
* @param fileSet the files are copied to the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} location
+ * @return
+ * @throws ScmException
+ */
+ ExportScmResult export( ScmRepository repository, ScmFileSet fileSet )
+ throws ScmException;
+
+ /**
+ * Create an exported copy of the repository on your local machine
+ *
+ * @param repository the source control system
+ * @param fileSet the files are copied to the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} location
* @param version get the version defined by the branch/tag/revision
* @return
* @throws ScmException
@@ -481,6 +532,17 @@
*
* @param repository the source control system
* @param fileSet location of your local copy
+ * @return
+ * @throws ScmException
+ */
+ UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet )
+ throws ScmException;
+
+ /**
+ * Updates the copy on the local machine with the changes in the repository
+ *
+ * @param repository the source control system
+ * @param fileSet location of your local copy
* @param tag use the version defined by the tag
* @return
* @throws ScmException
@@ -513,6 +575,18 @@
* @deprecated you must use {@link ScmProvider#update(org.apache.maven.scm.repository.ScmRepository,org.apache.maven.scm.ScmFileSet,org.apache.maven.scm.ScmVersion,boolean)}
*/
UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, String tag, boolean runChangelog )
+ throws ScmException;
+
+ /**
+ * Updates the copy on the local machine with the changes in the repository
+ *
+ * @param repository the source control system
+ * @param fileSet location of your local copy
+ * @param runChangelog Run the changelog command after the update
+ * @return
+ * @throws ScmException
+ */
+ UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, boolean runChangelog )
throws ScmException;
/**