maven-scm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r524909 [2/4] - in /maven/scm/trunk: maven-scm-api/src/main/java/org/apache/maven/scm/ maven-scm-api/src/main/java/org/apache/maven/scm/command/changelog/ maven-scm-api/src/main/java/org/apache/maven/scm/command/checkin/ maven-scm-api/src/m...
Date Mon, 02 Apr 2007 20:02:50 GMT
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=524909&r1=524908&r2=524909
==============================================================================
--- 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 Mon Apr  2 13:02:44 2007
@@ -19,8 +19,10 @@
  * under the License.
  */
 
+import org.apache.maven.scm.ScmBranch;
 import org.apache.maven.scm.ScmException;
 import org.apache.maven.scm.ScmFileSet;
+import org.apache.maven.scm.ScmVersion;
 import org.apache.maven.scm.command.add.AddScmResult;
 import org.apache.maven.scm.command.changelog.ChangeLogScmResult;
 import org.apache.maven.scm.command.checkin.CheckInScmResult;
@@ -123,7 +125,6 @@
     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.
      * This can be adding, removing, updating, ... of files
@@ -137,6 +138,7 @@
      * @param branch     the branch/tag name
      * @return The SCM result of the changelog command
      * @throws ScmException
+     * @deprecated you must use {@link ScmProvider#changeLog(org.apache.maven.scm.repository.ScmRepository,org.apache.maven.scm.ScmFileSet,java.util.Date,java.util.Date,int,org.apache.maven.scm.ScmBranch)}
      */
     ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet fileSet, Date startDate, Date endDate,
                                   int numDays, String branch )
@@ -146,6 +148,24 @@
      * Returns the changes that have happend in the source control system in a certain period of time.
      * This can be adding, removing, updating, ... of files
      *
+     * @param repository the source control system
+     * @param fileSet    the files to know the changes about. Implementations can also give the changes
+     *                   from the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} downwards.
+     * @param startDate  the start date of the period
+     * @param endDate    the end date of the period
+     * @param numDays    the number days before the current time if startdate and enddate are null
+     * @param branch     the branch/tag
+     * @return The SCM result of the changelog command
+     * @throws ScmException
+     */
+    ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet fileSet, Date startDate, Date endDate,
+                                  int numDays, ScmBranch branch )
+        throws ScmException;
+
+    /**
+     * Returns the changes that have happend in the source control system in a certain period of time.
+     * This can be adding, removing, updating, ... of files
+     *
      * @param repository  the source control system
      * @param fileSet     the files to know the changes about. Implementations can also give the changes
      *                    from the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} downwards.
@@ -156,12 +176,32 @@
      * @param datePattern the date pattern use in changelog output returned by scm tool
      * @return The SCM result of the changelog command
      * @throws ScmException
+     * @deprecated you must use {@link ScmProvider#changeLog(org.apache.maven.scm.repository.ScmRepository,org.apache.maven.scm.ScmFileSet,java.util.Date,java.util.Date,int,org.apache.maven.scm.ScmBranch,String)}
      */
     ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet fileSet, Date startDate, Date endDate,
                                   int numDays, String branch, String datePattern )
         throws ScmException;
 
     /**
+     * Returns the changes that have happend in the source control system in a certain period of time.
+     * This can be adding, removing, updating, ... of files
+     *
+     * @param repository  the source control system
+     * @param fileSet     the files to know the changes about. Implementations can also give the changes
+     *                    from the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} downwards.
+     * @param startDate   the start date of the period
+     * @param endDate     the end date of the period
+     * @param numDays     the number days before the current time if startdate and enddate are null
+     * @param branch      the branch/tag
+     * @param datePattern the date pattern use in changelog output returned by scm tool
+     * @return The SCM result of the changelog command
+     * @throws ScmException
+     */
+    ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet fileSet, Date startDate, Date endDate,
+                                  int numDays, ScmBranch branch, String datePattern )
+        throws ScmException;
+
+    /**
      * Returns the changes that have happend in the source control system between two tags.
      * This can be adding, removing, updating, ... of files
      *
@@ -172,6 +212,7 @@
      * @param endTag     the end tag
      * @return The SCM result of the changelog command
      * @throws ScmException
+     * @deprecated you must use {@link ScmProvider#changeLog(org.apache.maven.scm.repository.ScmRepository,org.apache.maven.scm.ScmFileSet,org.apache.maven.scm.ScmVersion,org.apache.maven.scm.ScmVersion)}
      */
     ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet fileSet, String startTag, String endTag )
         throws ScmException;
@@ -180,6 +221,22 @@
      * Returns the changes that have happend in the source control system between two tags.
      * This can be adding, removing, updating, ... of files
      *
+     * @param repository   the source control system
+     * @param fileSet      the files to know the changes about. Implementations can also give the changes
+     *                     from the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} downwards.
+     * @param startVersion the start branch/tag/revision
+     * @param endVersion   the end branch/tag/revision
+     * @return The SCM result of the changelog command
+     * @throws ScmException
+     */
+    ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet fileSet, ScmVersion startVersion,
+                                  ScmVersion endVersion )
+        throws ScmException;
+
+    /**
+     * Returns the changes that have happend in the source control system between two tags.
+     * This can be adding, removing, updating, ... of files
+     *
      * @param repository  the source control system
      * @param fileSet     the files to know the changes about. Implementations can also give the changes
      *                    from the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} downwards.
@@ -188,12 +245,30 @@
      * @param datePattern the date pattern use in changelog output returned by scm tool
      * @return
      * @throws ScmException
+     * @deprecated you must use {@link ScmProvider#changeLog(org.apache.maven.scm.repository.ScmRepository,org.apache.maven.scm.ScmFileSet,org.apache.maven.scm.ScmVersion,org.apache.maven.scm.ScmVersion,String)}
      */
     ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet fileSet, String startTag, String endTag,
                                   String datePattern )
         throws ScmException;
 
     /**
+     * Returns the changes that have happend in the source control system between two tags.
+     * This can be adding, removing, updating, ... of files
+     *
+     * @param repository    the source control system
+     * @param fileSet       the files to know the changes about. Implementations can also give the changes
+     *                      from the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} downwards.
+     * @param startRevision the start revision
+     * @param endRevision   the end revision
+     * @param datePattern   the date pattern use in changelog output returned by scm tool
+     * @return
+     * @throws ScmException
+     */
+    ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet fileSet, ScmVersion startRevision,
+                                  ScmVersion endRevision, String datePattern )
+        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/>
@@ -207,11 +282,30 @@
      * @param message    a string that is a comment on the changes that where done
      * @return
      * @throws ScmException
+     * @deprecated you must use {@link ScmProvider#checkIn(org.apache.maven.scm.repository.ScmRepository,org.apache.maven.scm.ScmFileSet,org.apache.maven.scm.ScmVersion,String)}
      */
     CheckInScmResult checkIn( ScmRepository repository, ScmFileSet fileSet, String tag, 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
+     * @throws ScmException
+     */
+    CheckInScmResult checkIn( ScmRepository repository, ScmFileSet fileSet, ScmVersion revision, String message )
+        throws ScmException;
+
+    /**
      * Create a copy of the repository on your local machine
      *
      * @param repository the source control system
@@ -219,11 +313,24 @@
      * @param tag        get the version defined by the tag
      * @return
      * @throws ScmException
+     * @deprecated you must use {@link ScmProvider#checkOut(org.apache.maven.scm.repository.ScmRepository,org.apache.maven.scm.ScmFileSet,org.apache.maven.scm.ScmVersion)}
      */
     CheckOutScmResult checkOut( ScmRepository repository, ScmFileSet fileSet, String tag )
         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
+     */
+    CheckOutScmResult checkOut( ScmRepository repository, ScmFileSet fileSet, ScmVersion version )
+        throws ScmException;
+
+    /**
      * Create a copy of the repository on your local machine.
      *
      * @param scmRepository the source control system
@@ -232,11 +339,51 @@
      * @param recursive     whether to check out recursively
      * @return
      * @throws ScmException
+     * @deprecated you must use {@link ScmProvider#checkOut(org.apache.maven.scm.repository.ScmRepository,org.apache.maven.scm.ScmFileSet,org.apache.maven.scm.ScmVersion,boolean)}
      */
     CheckOutScmResult checkOut( ScmRepository scmRepository, ScmFileSet scmFileSet, String tag, boolean recursive )
         throws ScmException;
 
-    DiffScmResult diff( ScmRepository repository, ScmFileSet fileSet, String startRevision, String endRevision )
+    /**
+     * 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
+     * @throws ScmException
+     */
+    CheckOutScmResult checkOut( ScmRepository scmRepository, ScmFileSet scmFileSet, ScmVersion version,
+                                boolean recursive )
+        throws ScmException;
+
+    /**
+     * Create a diff between two branch/tag/revision.
+     *
+     * @param scmRepository the source control system
+     * @param scmFileSet    the files are copied to the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} location
+     * @param startRevision the start revision
+     * @param endRevision   the end revision
+     * @return
+     * @throws ScmException
+     * @deprecated you must use {@link ScmProvider#diff(org.apache.maven.scm.repository.ScmRepository,org.apache.maven.scm.ScmFileSet,org.apache.maven.scm.ScmVersion,org.apache.maven.scm.ScmVersion)}
+     */
+    DiffScmResult diff( ScmRepository scmRepository, ScmFileSet scmFileSet, String startRevision, String endRevision )
+        throws ScmException;
+
+    /**
+     * Create a diff between two branch/tag/revision.
+     *
+     * @param scmRepository the source control system
+     * @param scmFileSet    the files are copied to the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} location
+     * @param startVersion  the start branch/tag/revision
+     * @param endVersion    the end branch/tag/revision
+     * @return
+     * @throws ScmException
+     */
+    DiffScmResult diff( ScmRepository scmRepository, ScmFileSet scmFileSet, ScmVersion startVersion,
+                        ScmVersion endVersion )
         throws ScmException;
 
     /**
@@ -247,6 +394,7 @@
      * @param tag        get the version defined by the tag
      * @return
      * @throws ScmException
+     * @deprecated you must use {@link ScmProvider#export(org.apache.maven.scm.repository.ScmRepository,org.apache.maven.scm.ScmFileSet,org.apache.maven.scm.ScmVersion)}
      */
     ExportScmResult export( ScmRepository repository, ScmFileSet fileSet, String tag )
         throws ScmException;
@@ -254,17 +402,43 @@
     /**
      * 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
+     */
+    ExportScmResult export( ScmRepository repository, ScmFileSet fileSet, ScmVersion version )
+        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 tag             get the version defined by the tag
      * @param outputDirectory the directory where the export will be stored
      * @return
      * @throws ScmException
+     * @deprecated you must use {@link ScmProvider#export(org.apache.maven.scm.repository.ScmRepository,org.apache.maven.scm.ScmFileSet,org.apache.maven.scm.ScmVersion,String)}
      */
     ExportScmResult export( ScmRepository repository, ScmFileSet fileSet, String tag, 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
+     * @throws ScmException
+     */
+    ExportScmResult export( ScmRepository repository, ScmFileSet fileSet, ScmVersion version, String outputDirectory )
+        throws ScmException;
+
+    /**
      * Removes the given files from the source control system
      *
      * @param repository the source control system
@@ -295,11 +469,11 @@
      * @param repository the source control system
      * @param fileSet    the files to tag. Implementations can also give the changes
      *                   from the {@link org.apache.maven.scm.ScmFileSet#getBasedir()} downwards.
-     * @param tag        the tag to apply to the files
+     * @param tagName    the tag name to apply to the files
      * @return
      * @throws ScmException
      */
-    TagScmResult tag( ScmRepository repository, ScmFileSet fileSet, String tag )
+    TagScmResult tag( ScmRepository repository, ScmFileSet fileSet, String tagName )
         throws ScmException;
 
     /**
@@ -310,6 +484,7 @@
      * @param tag        use the version defined by the tag
      * @return
      * @throws ScmException
+     * @deprecated you must use {@link ScmProvider#update(org.apache.maven.scm.repository.ScmRepository,org.apache.maven.scm.ScmFileSet,org.apache.maven.scm.ScmVersion)}
      */
     UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, String tag )
         throws ScmException;
@@ -317,12 +492,25 @@
     /**
      * 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 tag          use the version defined by the tag
      * @param runChangelog Run the changelog command after the update
      * @return
      * @throws ScmException
+     * @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;
@@ -330,12 +518,26 @@
     /**
      * 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
+     * @param runChangelog Run the changelog command after the update
+     * @return
+     * @throws ScmException
+     */
+    UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, ScmVersion version, 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 tag         use the version defined by the tag
      * @param datePattern the date pattern use in changelog output returned by scm tool
      * @return
      * @throws ScmException
+     * @deprecated you must use {@link ScmProvider#update(org.apache.maven.scm.repository.ScmRepository,org.apache.maven.scm.ScmFileSet,org.apache.maven.scm.ScmVersion,String)}
      */
     UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, String tag, String datePattern )
         throws ScmException;
@@ -343,12 +545,26 @@
     /**
      * 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
+     * @param datePattern the date pattern use in changelog output returned by scm tool
+     * @return
+     * @throws ScmException
+     */
+    UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, ScmVersion version, String datePattern )
+        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
      * @param lastUpdate
      * @return
      * @throws ScmException
+     * @deprecated you must use {@link ScmProvider#update(org.apache.maven.scm.repository.ScmRepository,org.apache.maven.scm.ScmFileSet,org.apache.maven.scm.ScmVersion,java.util.Date)}
      */
     UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, String tag, Date lastUpdate )
         throws ScmException;
@@ -356,6 +572,19 @@
     /**
      * 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
+     * @param lastUpdate
+     * @return
+     * @throws ScmException
+     */
+    UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, ScmVersion version, Date lastUpdate )
+        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
@@ -363,6 +592,7 @@
      * @param datePattern the date pattern use in changelog output returned by scm tool
      * @return
      * @throws ScmException
+     * @deprecated you must use {@link ScmProvider#update(org.apache.maven.scm.repository.ScmRepository,org.apache.maven.scm.ScmFileSet,org.apache.maven.scm.ScmVersion,java.util.Date,String)}
      */
     UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, String tag, Date lastUpdate,
                             String datePattern )
@@ -371,17 +601,16 @@
     /**
      * 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
-     * @param lastUpdate   Date of last update
-     * @param datePattern  the date pattern use in changelog output returned by scm tool
-     * @param runChangelog Run the changelog command after the update
+     * @param repository  the source control system
+     * @param fileSet     location of your local copy
+     * @param version     use the version defined by the branch/tag/revision
+     * @param lastUpdate  Date of last update
+     * @param datePattern the date pattern use in changelog output returned by scm tool
      * @return
      * @throws ScmException
      */
-    UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, String tag, Date lastUpdate,
-                            String datePattern, boolean runChangelog )
+    UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, ScmVersion version, Date lastUpdate,
+                            String datePattern )
         throws ScmException;
 
     /**
@@ -417,7 +646,20 @@
      * @param recursive  descend recursively
      * @param tag        use the version defined by the tag
      * @return the list of files in the repository
+     * @deprecated you must use {@link ScmProvider#list(org.apache.maven.scm.repository.ScmRepository,org.apache.maven.scm.ScmFileSet,boolean,org.apache.maven.scm.ScmVersion)}
      */
     ListScmResult list( ScmRepository repository, ScmFileSet fileSet, boolean recursive, String tag )
+        throws ScmException;
+
+    /**
+     * List each element (files and directories) of <B>fileSet</B> as they exist in the repository.
+     *
+     * @param repository the source control system
+     * @param fileSet    the files to list
+     * @param recursive  descend recursively
+     * @param version    use the version defined by the branch/tag/revision
+     * @return the list of files in the repository
+     */
+    ListScmResult list( ScmRepository repository, ScmFileSet fileSet, boolean recursive, ScmVersion version )
         throws ScmException;
 }

Modified: maven/scm/trunk/maven-scm-client/src/main/java/org/apache/maven/scm/client/cli/MavenScmCli.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-client/src/main/java/org/apache/maven/scm/client/cli/MavenScmCli.java?view=diff&rev=524909&r1=524908&r2=524909
==============================================================================
--- maven/scm/trunk/maven-scm-client/src/main/java/org/apache/maven/scm/client/cli/MavenScmCli.java (original)
+++ maven/scm/trunk/maven-scm-client/src/main/java/org/apache/maven/scm/client/cli/MavenScmCli.java Mon Apr  2 13:02:44 2007
@@ -19,10 +19,14 @@
  * under the License.
  */
 
+import org.apache.maven.scm.ScmBranch;
 import org.apache.maven.scm.ScmException;
 import org.apache.maven.scm.ScmFile;
 import org.apache.maven.scm.ScmFileSet;
 import org.apache.maven.scm.ScmResult;
+import org.apache.maven.scm.ScmRevision;
+import org.apache.maven.scm.ScmTag;
+import org.apache.maven.scm.ScmVersion;
 import org.apache.maven.scm.command.checkin.CheckInScmResult;
 import org.apache.maven.scm.command.checkout.CheckOutScmResult;
 import org.apache.maven.scm.command.update.UpdateScmResult;
@@ -101,7 +105,10 @@
 
         if ( args.length != 3 )
         {
-            System.err.println( "Usage: maven-scm-client <command> <working directory> <scm url>" );
+            System.err.println(
+                "Usage: maven-scm-client <command> <working directory> <scm url> [<scmVersion> [<scmVersionType>]]" );
+            System.err.println( "scmVersion is a branch name/tag name/revision number." );
+            System.err.println( "scmVersionType can be 'branch', 'tag', 'revision'. The default value is 'revision'." );
 
             return;
         }
@@ -112,9 +119,39 @@
 
         scmUrl = args[2];
 
-        String tag = null;
+        ScmVersion scmVersion = null;
+        if ( args.length > 3 )
+        {
+            String version = args[3];
+
+            if ( args.length > 4 )
+            {
+                String type = args[4];
+
+                if ( "tag".equals( type ) )
+                {
+                    scmVersion = new ScmTag( version );
+                }
+                else if ( "branch".equals( type ) )
+                {
+                    scmVersion = new ScmBranch( version );
+                }
+                else if ( "revision".equals( type ) )
+                {
+                    scmVersion = new ScmRevision( version );
+                }
+                else
+                {
+                    throw new IllegalArgumentException( "'" + type + "' version type isn't known." );
+                }
+            }
+            else
+            {
+                scmVersion = new ScmRevision( args[3] );
+            }
+        }
 
-        cli.execute( scmUrl, command, workingDirectory, tag );
+        cli.execute( scmUrl, command, workingDirectory, scmVersion );
 
         cli.stop();
     }
@@ -123,7 +160,7 @@
     //
     // ----------------------------------------------------------------------
 
-    public void execute( String scmUrl, String command, File workingDirectory, String tag )
+    public void execute( String scmUrl, String command, File workingDirectory, ScmVersion version )
     {
         ScmRepository repository;
 
@@ -150,15 +187,15 @@
         {
             if ( command.equals( "checkout" ) )
             {
-                checkOut( repository, workingDirectory, tag );
+                checkOut( repository, workingDirectory, version );
             }
             else if ( command.equals( "checkin" ) )
             {
-                checkIn( repository, workingDirectory, tag );
+                checkIn( repository, workingDirectory, version );
             }
             else if ( command.equals( "update" ) )
             {
-                update( repository, workingDirectory, tag );
+                update( repository, workingDirectory, version );
             }
             else
             {
@@ -179,7 +216,7 @@
     //
     // ----------------------------------------------------------------------
 
-    private void checkOut( ScmRepository scmRepository, File workingDirectory, String tag )
+    private void checkOut( ScmRepository scmRepository, File workingDirectory, ScmVersion version )
         throws ScmException
     {
         if ( workingDirectory.exists() )
@@ -198,7 +235,7 @@
         }
 
         CheckOutScmResult result = scmManager.getProviderByRepository( scmRepository )
-            .checkOut( scmRepository, new ScmFileSet( workingDirectory ), tag );
+            .checkOut( scmRepository, new ScmFileSet( workingDirectory ), version );
 
         if ( !result.isSuccess() )
         {
@@ -219,7 +256,7 @@
         }
     }
 
-    private void checkIn( ScmRepository scmRepository, File workingDirectory, String tag )
+    private void checkIn( ScmRepository scmRepository, File workingDirectory, ScmVersion version )
         throws ScmException
     {
         if ( !workingDirectory.exists() )
@@ -232,7 +269,7 @@
         String message = "";
 
         CheckInScmResult result = scmManager.getProviderByRepository( scmRepository )
-            .checkIn( scmRepository, new ScmFileSet( workingDirectory ), tag, message );
+            .checkIn( scmRepository, new ScmFileSet( workingDirectory ), version, message );
 
         if ( !result.isSuccess() )
         {
@@ -253,7 +290,7 @@
         }
     }
 
-    private void update( ScmRepository scmRepository, File workingDirectory, String tag )
+    private void update( ScmRepository scmRepository, File workingDirectory, ScmVersion version )
         throws ScmException
     {
         if ( !workingDirectory.exists() )
@@ -264,7 +301,7 @@
         }
 
         UpdateScmResult result = scmManager.getProviderByRepository( scmRepository )
-            .update( scmRepository, new ScmFileSet( workingDirectory ), tag );
+            .update( scmRepository, new ScmFileSet( workingDirectory ), version );
 
         if ( !result.isSuccess() )
         {

Modified: maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/AbstractScmMojo.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/AbstractScmMojo.java?view=diff&rev=524909&r1=524908&r2=524909
==============================================================================
--- maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/AbstractScmMojo.java (original)
+++ maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/AbstractScmMojo.java Mon Apr  2 13:02:44 2007
@@ -21,9 +21,13 @@
 
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.scm.ScmBranch;
 import org.apache.maven.scm.ScmException;
 import org.apache.maven.scm.ScmFileSet;
 import org.apache.maven.scm.ScmResult;
+import org.apache.maven.scm.ScmRevision;
+import org.apache.maven.scm.ScmTag;
+import org.apache.maven.scm.ScmVersion;
 import org.apache.maven.scm.manager.ScmManager;
 import org.apache.maven.scm.provider.ScmProviderRepository;
 import org.apache.maven.scm.provider.ScmProviderRepositoryWithHost;
@@ -360,5 +364,36 @@
     public void setExcludes( String excludes )
     {
         this.excludes = excludes;
+    }
+
+    public ScmVersion getScmVersion( String versionType, String version )
+        throws MojoExecutionException
+    {
+        if ( StringUtils.isEmpty( versionType ) && StringUtils.isNotEmpty( version ) )
+        {
+            throw new MojoExecutionException( "You must specify the version type." );
+        }
+
+        if ( StringUtils.isEmpty( version ) )
+        {
+            return null;
+        }
+
+        if ( "branch".equals( versionType ) )
+        {
+            return new ScmBranch( version );
+        }
+
+        if ( "tag".equals( versionType ) )
+        {
+            return new ScmTag( version );
+        }
+
+        if ( "revision".equals( versionType ) )
+        {
+            return new ScmRevision( version );
+        }
+
+        throw new MojoExecutionException( "Unknown '" + versionType + "' version type." );
     }
 }

Modified: maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/ChangeLogMojo.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/ChangeLogMojo.java?view=diff&rev=524909&r1=524908&r2=524909
==============================================================================
--- maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/ChangeLogMojo.java (original)
+++ maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/ChangeLogMojo.java Mon Apr  2 13:02:44 2007
@@ -22,6 +22,7 @@
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.scm.ChangeSet;
 import org.apache.maven.scm.ScmException;
+import org.apache.maven.scm.ScmBranch;
 import org.apache.maven.scm.command.changelog.ChangeLogScmResult;
 import org.apache.maven.scm.command.changelog.ChangeLogSet;
 import org.apache.maven.scm.provider.ScmProvider;
@@ -74,6 +75,20 @@
      */
     private String userDateFormat = DEFAULT_DATE_FORMAT;
 
+    /**
+     * The version type (branch/tag) of scmVersion.
+     *
+     * @parameter expression="${scmVersionType}"
+     */
+    private String scmVersionType;
+
+    /**
+     * The version (revision number/branch name/tag name).
+     *
+     * @parameter expression="${scmVersion}"
+     */
+    private String scmVersion;
+
     public void execute()
         throws MojoExecutionException
     {
@@ -87,7 +102,7 @@
 
             ChangeLogScmResult result = provider.changeLog( repository, getFileSet(),
                                                             this.parseDate( localFormat, this.startDate ),
-                                                            this.parseDate( localFormat, this.endDate ), 0, null,
+                                                            this.parseDate( localFormat, this.endDate ), 0, (ScmBranch)getScmVersion( scmVersionType, scmVersion),
                                                             dateFormat );
             checkResult( result );
 

Modified: maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/CheckinMojo.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/CheckinMojo.java?view=diff&rev=524909&r1=524908&r2=524909
==============================================================================
--- maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/CheckinMojo.java (original)
+++ maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/CheckinMojo.java Mon Apr  2 13:02:44 2007
@@ -51,6 +51,20 @@
      */
     private String connectionType;
 
+    /**
+     * The version type (branch/tag/revision) of scmVersion.
+     *
+     * @parameter expression="${scmVersionType}"
+     */
+    private String scmVersionType;
+
+    /**
+     * The version (revision number/branch name/tag name).
+     *
+     * @parameter expression="${scmVersion}"
+     */
+    private String scmVersion;
+
     public void execute()
         throws MojoExecutionException
     {
@@ -61,7 +75,10 @@
             ScmRepository repository = getScmRepository();
 
             CheckInScmResult result = getScmManager().getProviderByRepository( repository ).checkIn( repository,
-                                                                                                     getFileSet(), null,
+                                                                                                     getFileSet(),
+                                                                                                     getScmVersion(
+                                                                                                         scmVersionType,
+                                                                                                         scmVersion ),
                                                                                                      message );
 
             checkResult( result );

Modified: maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/CheckoutMojo.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/CheckoutMojo.java?view=diff&rev=524909&r1=524908&r2=524909
==============================================================================
--- maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/CheckoutMojo.java (original)
+++ maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/CheckoutMojo.java Mon Apr  2 13:02:44 2007
@@ -42,32 +42,32 @@
     extends AbstractScmMojo
 {
     /**
-     * Branch name.
+     * The directory to checkout the sources to for the bootstrap and checkout goals.
      *
-     * @parameter expression="${branch}"
+     * @parameter expression="${checkoutDirectory}" default-value="${project.build.directory}/checkout"
      */
-    private String branch;
+    private File checkoutDirectory;
 
     /**
-     * The tag to use when checking out or tagging a project.
+     * Skip checkout if checkoutDirectory exists.
      *
-     * @parameter expression="${tag}"
+     * @parameter expression="${skipCheckoutIfExists}" default-value="false"
      */
-    private String tag;
+    private boolean skipCheckoutIfExists = false;
 
     /**
-     * The directory to checkout the sources to for the bootstrap and checkout goals.
+     * The version type (branch/tag/revision) of scmVersion.
      *
-     * @parameter expression="${checkoutDirectory}" default-value="${project.build.directory}/checkout"
+     * @parameter expression="${scmVersionType}"
      */
-    private File checkoutDirectory;
+    private String scmVersionType;
 
     /**
-     * Skip checkout if checkoutDirectory exists.
+     * The version (revision number/branch name/tag name).
      *
-     * @parameter expression="${skipCheckoutIfExists}" default-value="false"
+     * @parameter expression="${scmVersion}"
      */
-    private boolean skipCheckoutIfExists = false;
+    private String scmVersion;
 
     public void execute()
         throws MojoExecutionException
@@ -96,18 +96,6 @@
         {
             ScmRepository repository = getScmRepository();
 
-            String currentTag = null;
-
-            if ( branch != null )
-            {
-                currentTag = branch;
-            }
-
-            if ( tag != null )
-            {
-                currentTag = tag;
-            }
-
             try
             {
                 this.getLog().info( "Removing " + getCheckoutDirectory() );
@@ -127,7 +115,9 @@
             CheckOutScmResult result = getScmManager().getProviderByRepository( repository ).checkOut( repository,
                                                                                                        new ScmFileSet(
                                                                                                            getCheckoutDirectory().getAbsoluteFile() ),
-                                                                                                       currentTag );
+                                                                                                       getScmVersion(
+                                                                                                           scmVersionType,
+                                                                                                           scmVersion ) );
 
             checkResult( result );
 

Modified: maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/DiffMojo.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/DiffMojo.java?view=diff&rev=524909&r1=524908&r2=524909
==============================================================================
--- maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/DiffMojo.java (original)
+++ maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/DiffMojo.java Mon Apr  2 13:02:44 2007
@@ -40,18 +40,32 @@
     extends AbstractScmMojo
 {
     /**
-     * Start revision id.
+     * The version type (branch/tag/revision) of scmVersion.
      *
-     * @parameter expression="${startRevision}"
+     * @parameter expression="${startScmVersionType}"
      */
-    private String startRevision;
+    private String startScmVersionType;
 
     /**
-     * End revision id.
+     * The version (revision number/branch name/tag name).
      *
-     * @parameter expression="${endRevision}"
+     * @parameter expression="${startScmVersion}"
      */
-    private String endRevision;
+    private String startScmVersion;
+
+    /**
+     * The version type (branch/tag/revision) of scmVersion.
+     *
+     * @parameter expression="${endScmVersionType}"
+     */
+    private String endScmVersionType;
+
+    /**
+     * The version (revision number/branch name/tag name).
+     *
+     * @parameter expression="${startScmVersion}"
+     */
+    private String endScmVersion;
 
     /**
      * Output file name.
@@ -69,8 +83,12 @@
             ScmRepository repository = getScmRepository();
 
             DiffScmResult result = getScmManager().getProviderByRepository( repository ).diff( repository, getFileSet(),
-                                                                                               startRevision,
-                                                                                               endRevision );
+                                                                                               getScmVersion(
+                                                                                                   startScmVersionType,
+                                                                                                   startScmVersion ),
+                                                                                               getScmVersion(
+                                                                                                   endScmVersionType,
+                                                                                                   endScmVersion ) );
 
             checkResult( result );
 

Modified: maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/ExportMojo.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/ExportMojo.java?view=diff&rev=524909&r1=524908&r2=524909
==============================================================================
--- maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/ExportMojo.java (original)
+++ maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/ExportMojo.java Mon Apr  2 13:02:44 2007
@@ -43,18 +43,18 @@
     extends AbstractScmMojo
 {
     /**
-     * Branch name.
+     * The version type (branch/tag/revision) of scmVersion.
      *
-     * @parameter expression="${branch}"
+     * @parameter expression="${scmVersionType}"
      */
-    private String branch;
+    private String scmVersionType;
 
     /**
-     * The tag to use when checking out or tagging a project.
+     * The version (revision number/branch name/tag name).
      *
-     * @parameter expression="${tag}"
+     * @parameter expression="${scmVersion}"
      */
-    private String tag;
+    private String scmVersion;
 
     /**
      * The directory to export the sources to.
@@ -86,18 +86,6 @@
         {
             ScmRepository repository = getScmRepository();
 
-            String currentTag = null;
-
-            if ( branch != null )
-            {
-                currentTag = branch;
-            }
-
-            if ( tag != null )
-            {
-                currentTag = tag;
-            }
-
             try
             {
                 if ( StringUtils.isNotEmpty( getExportDirectory() ) )
@@ -122,7 +110,9 @@
                                                                                                    new ScmFileSet(
                                                                                                        new File(
                                                                                                            getExportDirectory() ).getAbsoluteFile() ),
-                                                                                                   currentTag,
+                                                                                                   getScmVersion(
+                                                                                                       scmVersionType,
+                                                                                                       scmVersion ),
                                                                                                    getExportDirectory() );
 
             checkResult( result );

Modified: maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/ListMojo.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/ListMojo.java?view=diff&rev=524909&r1=524908&r2=524909
==============================================================================
--- maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/ListMojo.java (original)
+++ maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/ListMojo.java Mon Apr  2 13:02:44 2007
@@ -43,18 +43,18 @@
     extends AbstractScmMojo
 {
     /**
-     * Branch name.
+     * The version type (branch/tag/revision) of scmVersion.
      *
-     * @parameter expression="${branch}"
+     * @parameter expression="${scmVersionType}"
      */
-    private String branch;
+    private String scmVersionType;
 
     /**
-     * The tag to use when checking out or tagging a project.
+     * The version (revision number/branch name/tag name).
      *
-     * @parameter expression="${tag}"
+     * @parameter expression="${scmVersion}"
      */
-    private String tag;
+    private String scmVersion;
 
     /**
      * Use recursive mode.
@@ -66,23 +66,12 @@
     public void execute()
         throws MojoExecutionException, MojoFailureException
     {
-        String currentTag = null;
-
-        if ( branch != null )
-        {
-            currentTag = branch;
-        }
-
-        if ( tag != null )
-        {
-            currentTag = tag;
-        }
-
         try
         {
             ScmRepository repository = getScmRepository();
             ListScmResult result = getScmManager().getProviderByRepository( repository ).list( repository, getFileSet(),
-                                                                                               recursive, currentTag );
+                                                                                               recursive, getScmVersion(
+                scmVersionType, scmVersion ) );
 
             checkResult( result );
 

Modified: maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/UpdateMojo.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/UpdateMojo.java?view=diff&rev=524909&r1=524908&r2=524909
==============================================================================
--- maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/UpdateMojo.java (original)
+++ maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/UpdateMojo.java Mon Apr  2 13:02:44 2007
@@ -41,18 +41,18 @@
     extends AbstractScmMojo
 {
     /**
-     * Branch name.
+     * The version type (branch/tag/revision) of scmVersion.
      *
-     * @parameter expression="${branch}"
+     * @parameter expression="${scmVersionType}"
      */
-    private String branch;
+    private String scmVersionType;
 
     /**
-     * Tag name.
+     * The version (revision number/branch name/tag name).
      *
-     * @parameter expression="${tag}"
+     * @parameter expression="${scmVersion}"
      */
-    private String tag;
+    private String scmVersion;
 
     /**
      * The project property where to store the revision name.
@@ -84,21 +84,11 @@
         {
             ScmRepository repository = getScmRepository();
 
-            String currentTag = null;
-
-            if ( branch != null )
-            {
-                currentTag = branch;
-            }
-
-            if ( tag != null )
-            {
-                currentTag = tag;
-            }
-
             UpdateScmResult result = getScmManager().getProviderByRepository( repository ).update( repository,
                                                                                                    getFileSet(),
-                                                                                                   currentTag,
+                                                                                                   getScmVersion(
+                                                                                                       scmVersionType,
+                                                                                                       scmVersion ),
                                                                                                    runChangelog );
 
             checkResult( result );

Modified: maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/UpdateSubprojectsMojo.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/UpdateSubprojectsMojo.java?view=diff&rev=524909&r1=524908&r2=524909
==============================================================================
--- maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/UpdateSubprojectsMojo.java (original)
+++ maven/scm/trunk/maven-scm-plugin/src/main/java/org/apache/maven/scm/plugin/UpdateSubprojectsMojo.java Mon Apr  2 13:02:44 2007
@@ -36,18 +36,18 @@
     extends AbstractScmMojo
 {
     /**
-     * Branch name.
+     * The version type (branch/tag/revision) of scmVersion.
      *
-     * @parameter expression="${branch}"
+     * @parameter expression="${scmVersionType}"
      */
-    private String branch;
+    private String scmVersionType;
 
     /**
-     * Tag name.
+     * The version (revision number/branch name/tag name).
      *
-     * @parameter expression="${tag}"
+     * @parameter expression="${scmVersion}"
      */
-    private String tag;
+    private String scmVersion;
 
     /**
      * The project property where to store the revision name.
@@ -72,20 +72,11 @@
         {
             ScmRepository repository = getScmRepository();
 
-            String currentTag = null;
-
-            if ( branch != null )
-            {
-                currentTag = branch;
-            }
-
-            if ( tag != null )
-            {
-                currentTag = tag;
-            }
-
-            UpdateScmResult result =
-                getScmManager().getProviderByRepository( repository ).update( repository, getFileSet(), currentTag );
+            UpdateScmResult result = getScmManager().getProviderByRepository( repository ).update( repository,
+                                                                                                   getFileSet(),
+                                                                                                   getScmVersion(
+                                                                                                       scmVersionType,
+                                                                                                       scmVersion ) );
 
             checkResult( result );
 

Modified: maven/scm/trunk/maven-scm-plugin/src/test/resources/mojos/tag/checkout.xml
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-plugin/src/test/resources/mojos/tag/checkout.xml?view=diff&rev=524909&r1=524908&r2=524909
==============================================================================
--- maven/scm/trunk/maven-scm-plugin/src/test/resources/mojos/tag/checkout.xml (original)
+++ maven/scm/trunk/maven-scm-plugin/src/test/resources/mojos/tag/checkout.xml Mon Apr  2 13:02:44 2007
@@ -27,7 +27,8 @@
           <checkoutDirectory>target/tags/mytag</checkoutDirectory>
           <connectionType>connection</connectionType>
           <connectionUrl>scm:svn:file:///${basedir}/target/repository/trunk</connectionUrl>
-          <tag>mytag</tag>
+          <scmVersionType>tag</scmVersionType>
+          <scmVersion>mytag</scmVersion>
         </configuration>
       </plugin>
     </plugins>

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/changelog/BazaarChangeLogCommand.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/changelog/BazaarChangeLogCommand.java?view=diff&rev=524909&r1=524908&r2=524909
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/changelog/BazaarChangeLogCommand.java (original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/changelog/BazaarChangeLogCommand.java Mon Apr  2 13:02:44 2007
@@ -23,6 +23,7 @@
 import org.apache.maven.scm.ScmException;
 import org.apache.maven.scm.ScmFileSet;
 import org.apache.maven.scm.ScmResult;
+import org.apache.maven.scm.ScmBranch;
 import org.apache.maven.scm.command.changelog.AbstractChangeLogCommand;
 import org.apache.maven.scm.command.changelog.ChangeLogScmResult;
 import org.apache.maven.scm.command.changelog.ChangeLogSet;
@@ -43,7 +44,7 @@
     implements BazaarCommand
 {
     protected ChangeLogScmResult executeChangeLogCommand( ScmProviderRepository repo, ScmFileSet fileSet,
-                                                          Date startDate, Date endDate, String branch,
+                                                          Date startDate, Date endDate, ScmBranch branch,
                                                           String datePattern )
         throws ScmException
     {

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/checkin/BazaarCheckInCommand.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/checkin/BazaarCheckInCommand.java?view=diff&rev=524909&r1=524908&r2=524909
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/checkin/BazaarCheckInCommand.java (original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/checkin/BazaarCheckInCommand.java Mon Apr  2 13:02:44 2007
@@ -24,6 +24,7 @@
 import org.apache.maven.scm.ScmFileSet;
 import org.apache.maven.scm.ScmFileStatus;
 import org.apache.maven.scm.ScmResult;
+import org.apache.maven.scm.ScmVersion;
 import org.apache.maven.scm.command.checkin.AbstractCheckInCommand;
 import org.apache.maven.scm.command.checkin.CheckInScmResult;
 import org.apache.maven.scm.command.status.StatusScmResult;
@@ -48,11 +49,11 @@
 {
 
     protected CheckInScmResult executeCheckInCommand( ScmProviderRepository repo, ScmFileSet fileSet, String message,
-                                                      String tag )
+                                                      ScmVersion version )
         throws ScmException
     {
 
-        if ( !StringUtils.isEmpty( tag ) )
+        if ( version != null && StringUtils.isNotEmpty( version.getName() ) )
         {
             throw new ScmException( "This provider can't handle tags." );
         }

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/checkout/BazaarCheckOutCommand.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/checkout/BazaarCheckOutCommand.java?view=diff&rev=524909&r1=524908&r2=524909
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/checkout/BazaarCheckOutCommand.java (original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/checkout/BazaarCheckOutCommand.java Mon Apr  2 13:02:44 2007
@@ -22,6 +22,7 @@
 import org.apache.maven.scm.ScmException;
 import org.apache.maven.scm.ScmFileSet;
 import org.apache.maven.scm.ScmResult;
+import org.apache.maven.scm.ScmVersion;
 import org.apache.maven.scm.command.checkout.AbstractCheckOutCommand;
 import org.apache.maven.scm.command.checkout.CheckOutScmResult;
 import org.apache.maven.scm.provider.ScmProviderRepository;
@@ -43,11 +44,12 @@
     implements BazaarCommand
 {
 
-    protected CheckOutScmResult executeCheckOutCommand( ScmProviderRepository repo, ScmFileSet fileSet, String tag )
+    protected CheckOutScmResult executeCheckOutCommand( ScmProviderRepository repo, ScmFileSet fileSet,
+                                                        ScmVersion version )
         throws ScmException
     {
 
-        if ( !StringUtils.isEmpty( tag ) )
+        if ( version != null && StringUtils.isNotEmpty( version.getName() ) )
         {
             throw new ScmException( "This provider can't handle tags." );
         }

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/diff/BazaarDiffCommand.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/diff/BazaarDiffCommand.java?view=diff&rev=524909&r1=524908&r2=524909
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/diff/BazaarDiffCommand.java (original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/diff/BazaarDiffCommand.java Mon Apr  2 13:02:44 2007
@@ -22,6 +22,7 @@
 import org.apache.maven.scm.ScmException;
 import org.apache.maven.scm.ScmFileSet;
 import org.apache.maven.scm.ScmResult;
+import org.apache.maven.scm.ScmVersion;
 import org.apache.maven.scm.command.diff.AbstractDiffCommand;
 import org.apache.maven.scm.command.diff.DiffScmResult;
 import org.apache.maven.scm.provider.ScmProviderRepository;
@@ -37,18 +38,18 @@
     implements BazaarCommand
 {
 
-    protected DiffScmResult executeDiffCommand( ScmProviderRepository repo, ScmFileSet fileSet, String startRevision,
-                                                String endRevision )
+    protected DiffScmResult executeDiffCommand( ScmProviderRepository repo, ScmFileSet fileSet,
+                                                ScmVersion startRevision, ScmVersion endRevision )
         throws ScmException
     {
 
         String[] diffCmd;
-        if ( !StringUtils.isEmpty( startRevision ) )
+        if ( startRevision != null && StringUtils.isNotEmpty( startRevision.getName() ) )
         {
-            String revArg = startRevision;
-            if ( !StringUtils.isEmpty( endRevision ) )
+            String revArg = startRevision.getName();
+            if ( endRevision != null && StringUtils.isNotEmpty( endRevision.getName() ) )
             {
-                revArg += ".." + endRevision;
+                revArg += ".." + endRevision.getName();
             }
             diffCmd = new String[]{DIFF_CMD, REVISION_OPTION, revArg};
         }

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/update/BazaarUpdateCommand.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/update/BazaarUpdateCommand.java?view=diff&rev=524909&r1=524908&r2=524909
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/update/BazaarUpdateCommand.java (original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-bazaar/src/main/java/org/apache/maven/scm/provider/bazaar/command/update/BazaarUpdateCommand.java Mon Apr  2 13:02:44 2007
@@ -24,6 +24,7 @@
 import org.apache.maven.scm.ScmFileSet;
 import org.apache.maven.scm.ScmFileStatus;
 import org.apache.maven.scm.ScmResult;
+import org.apache.maven.scm.ScmVersion;
 import org.apache.maven.scm.command.changelog.ChangeLogCommand;
 import org.apache.maven.scm.command.update.AbstractUpdateCommand;
 import org.apache.maven.scm.command.update.UpdateScmResult;
@@ -50,11 +51,11 @@
     implements BazaarCommand
 {
 
-    protected UpdateScmResult executeUpdateCommand( ScmProviderRepository repo, ScmFileSet fileSet, String tag )
+    protected UpdateScmResult executeUpdateCommand( ScmProviderRepository repo, ScmFileSet fileSet, ScmVersion version )
         throws ScmException
     {
 
-        if ( !StringUtils.isEmpty( tag ) )
+        if ( version != null && StringUtils.isNotEmpty( version.getName() ) )
         {
             throw new ScmException( "This provider can't handle tags." );
         }

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/main/java/org/apache/maven/scm/provider/clearcase/command/changelog/ClearCaseChangeLogCommand.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/main/java/org/apache/maven/scm/provider/clearcase/command/changelog/ClearCaseChangeLogCommand.java?view=diff&rev=524909&r1=524908&r2=524909
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/main/java/org/apache/maven/scm/provider/clearcase/command/changelog/ClearCaseChangeLogCommand.java (original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/main/java/org/apache/maven/scm/provider/clearcase/command/changelog/ClearCaseChangeLogCommand.java Mon Apr  2 13:02:44 2007
@@ -19,6 +19,7 @@
  * under the License.
  */
 
+import org.apache.maven.scm.ScmBranch;
 import org.apache.maven.scm.ScmException;
 import org.apache.maven.scm.ScmFileSet;
 import org.apache.maven.scm.command.changelog.AbstractChangeLogCommand;
@@ -28,6 +29,7 @@
 import org.apache.maven.scm.provider.clearcase.command.ClearCaseCommand;
 import org.apache.maven.scm.provider.clearcase.util.ClearCaseUtil;
 import org.apache.maven.scm.providers.clearcase.settings.Settings;
+import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.util.cli.CommandLineException;
 import org.codehaus.plexus.util.cli.CommandLineUtils;
 import org.codehaus.plexus.util.cli.Commandline;
@@ -55,7 +57,7 @@
     // ----------------------------------------------------------------------
 
     protected ChangeLogScmResult executeChangeLogCommand( ScmProviderRepository repository, ScmFileSet fileSet,
-                                                          Date startDate, Date endDate, String branch,
+                                                          Date startDate, Date endDate, ScmBranch branch,
                                                           String datePattern )
         throws ScmException
     {
@@ -99,7 +101,7 @@
      * @param startDate
      * @return The command line
      */
-    public static Commandline createCommandLine( File workingDirectory, String branch, Date startDate )
+    public static Commandline createCommandLine( File workingDirectory, ScmBranch branch, Date startDate )
     {
         Commandline command = new Commandline();
         command.setExecutable( "cleartool" );
@@ -131,11 +133,11 @@
 
         // TODO: End date?
 
-        if ( branch != null )
+        if ( branch != null && StringUtils.isNotEmpty( branch.getName() ) )
         {
             command.createArgument().setValue( "-branch" );
 
-            command.createArgument().setValue( branch );
+            command.createArgument().setValue( branch.getName() );
         }
 
         return command;

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/main/java/org/apache/maven/scm/provider/clearcase/command/checkin/ClearCaseCheckInCommand.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/main/java/org/apache/maven/scm/provider/clearcase/command/checkin/ClearCaseCheckInCommand.java?view=diff&rev=524909&r1=524908&r2=524909
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/main/java/org/apache/maven/scm/provider/clearcase/command/checkin/ClearCaseCheckInCommand.java (original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/main/java/org/apache/maven/scm/provider/clearcase/command/checkin/ClearCaseCheckInCommand.java Mon Apr  2 13:02:44 2007
@@ -21,6 +21,7 @@
 
 import org.apache.maven.scm.ScmException;
 import org.apache.maven.scm.ScmFileSet;
+import org.apache.maven.scm.ScmVersion;
 import org.apache.maven.scm.command.checkin.AbstractCheckInCommand;
 import org.apache.maven.scm.command.checkin.CheckInScmResult;
 import org.apache.maven.scm.provider.ScmProviderRepository;
@@ -43,7 +44,7 @@
     // ----------------------------------------------------------------------
 
     protected CheckInScmResult executeCheckInCommand( ScmProviderRepository scmProviderRepository, ScmFileSet fileSet,
-                                                      String message, String tag )
+                                                      String message, ScmVersion version )
         throws ScmException
     {
         getLogger().debug( "executing checkin command..." );

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/main/java/org/apache/maven/scm/provider/clearcase/command/checkout/ClearCaseCheckOutCommand.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/main/java/org/apache/maven/scm/provider/clearcase/command/checkout/ClearCaseCheckOutCommand.java?view=diff&rev=524909&r1=524908&r2=524909
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/main/java/org/apache/maven/scm/provider/clearcase/command/checkout/ClearCaseCheckOutCommand.java (original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/main/java/org/apache/maven/scm/provider/clearcase/command/checkout/ClearCaseCheckOutCommand.java Mon Apr  2 13:02:44 2007
@@ -21,6 +21,7 @@
 
 import org.apache.maven.scm.ScmException;
 import org.apache.maven.scm.ScmFileSet;
+import org.apache.maven.scm.ScmVersion;
 import org.apache.maven.scm.command.checkout.AbstractCheckOutCommand;
 import org.apache.maven.scm.command.checkout.CheckOutScmResult;
 import org.apache.maven.scm.provider.ScmProviderRepository;
@@ -29,6 +30,7 @@
 import org.apache.maven.scm.provider.clearcase.util.ClearCaseUtil;
 import org.apache.maven.scm.providers.clearcase.settings.Settings;
 import org.codehaus.plexus.util.FileUtils;
+import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.util.cli.CommandLineException;
 import org.codehaus.plexus.util.cli.CommandLineUtils;
 import org.codehaus.plexus.util.cli.Commandline;
@@ -55,13 +57,15 @@
     // ----------------------------------------------------------------------
 
     protected CheckOutScmResult executeCheckOutCommand( ScmProviderRepository repository, ScmFileSet fileSet,
-                                                        String tag )
+                                                        ScmVersion version )
         throws ScmException
     {
         getLogger().debug( "executing checkout command..." );
         ClearCaseScmProviderRepository repo = (ClearCaseScmProviderRepository) repository;
         File workingDirectory = fileSet.getBasedir();
-        getLogger().debug( "tag: " + tag );
+
+        getLogger().debug( version.getType() + ": " + version.getName() );
+
         if ( isClearCaseLT() )
         {
             getLogger().debug( "Running with CLEARCASE LT" );
@@ -98,7 +102,7 @@
                 if ( !repo.isAutoConfigSpec() )
                 {
                     configSpecLocation = repo.getConfigSpec();
-                    if ( tag != null )
+                    if ( version != null && StringUtils.isNotEmpty( version.getName() ) )
                     {
                         // Another config spec is needed in this case.
                         //
@@ -116,7 +120,7 @@
                 {
 
                     // write config spec to temp file
-                    String configSpec = createConfigSpec( repo.getLoadDirectory(), tag );
+                    String configSpec = createConfigSpec( repo.getLoadDirectory(), version );
                     getLogger().info( "Created config spec for view '" + viewName + "':\n" + configSpec );
                     configSpecLocation = writeTemporaryConfigSpecFile( configSpec, viewName );
 
@@ -197,18 +201,18 @@
      * given version tag
      *
      * @param loadDirectory the VOB directory to be loaded
-     * @param tag           ClearCase label type; notice that branch types are not
+     * @param version       ClearCase label type; notice that branch types are not
      *                      supported
      * @return Config Spec as String
      */
-    protected static String createConfigSpec( String loadDirectory, String tag )
+    protected static String createConfigSpec( String loadDirectory, ScmVersion version )
     {
         // create config spec
         StringBuffer configSpec = new StringBuffer();
         configSpec.append( "element * CHECKEDOUT\n" );
-        if ( tag != null )
+        if ( version != null && StringUtils.isNotEmpty( version.getName() ) )
         {
-            configSpec.append( "element * " + tag + "\n" );
+            configSpec.append( "element * " + version.getName() + "\n" );
             configSpec.append( "element -directory * /main/LATEST\n" );
         }
         else

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/main/java/org/apache/maven/scm/provider/clearcase/command/update/ClearCaseUpdateCommand.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/main/java/org/apache/maven/scm/provider/clearcase/command/update/ClearCaseUpdateCommand.java?view=diff&rev=524909&r1=524908&r2=524909
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/main/java/org/apache/maven/scm/provider/clearcase/command/update/ClearCaseUpdateCommand.java (original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/main/java/org/apache/maven/scm/provider/clearcase/command/update/ClearCaseUpdateCommand.java Mon Apr  2 13:02:44 2007
@@ -21,6 +21,7 @@
 
 import org.apache.maven.scm.ScmException;
 import org.apache.maven.scm.ScmFileSet;
+import org.apache.maven.scm.ScmVersion;
 import org.apache.maven.scm.command.changelog.ChangeLogCommand;
 import org.apache.maven.scm.command.update.AbstractUpdateCommand;
 import org.apache.maven.scm.command.update.UpdateScmResult;
@@ -40,7 +41,8 @@
     extends AbstractUpdateCommand
     implements ClearCaseCommand
 {
-    protected UpdateScmResult executeUpdateCommand( ScmProviderRepository repository, ScmFileSet fileSet, String tag )
+    protected UpdateScmResult executeUpdateCommand( ScmProviderRepository repository, ScmFileSet fileSet,
+                                                    ScmVersion version )
         throws ScmException
     {
         getLogger().debug( "executing update command..." );

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/test/java/org/apache/maven/scm/provider/clearcase/command/changelog/ClearCaseChangeLogCommandTest.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/test/java/org/apache/maven/scm/provider/clearcase/command/changelog/ClearCaseChangeLogCommandTest.java?view=diff&rev=524909&r1=524908&r2=524909
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/test/java/org/apache/maven/scm/provider/clearcase/command/changelog/ClearCaseChangeLogCommandTest.java (original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/test/java/org/apache/maven/scm/provider/clearcase/command/changelog/ClearCaseChangeLogCommandTest.java Mon Apr  2 13:02:44 2007
@@ -19,6 +19,7 @@
  * under the License.
  */
 
+import org.apache.maven.scm.ScmBranch;
 import org.apache.maven.scm.ScmTestCase;
 import org.codehaus.plexus.util.cli.Commandline;
 
@@ -37,52 +38,44 @@
     public void testGetCommandLine()
         throws Exception
     {
-        String tag = null;
-
         Date startDate = null;
 
         Date endDate = null;
 
-        testCommandLine( tag, startDate, endDate,
+        testCommandLine( null, startDate, endDate,
                          "cleartool lshistory -fmt \"NAME:%En\\nDATE:%Nd\\nCOMM:%-12.12o - %o - %c - Activity: %[activity]p\\nUSER:%-8.8u\\n\" -recurse -nco" );
     }
 
     public void testGetCommandLineWithTag()
         throws Exception
     {
-        String tag = "myBranch";
-
         Date startDate = null;
 
         Date endDate = null;
 
-        testCommandLine( tag, startDate, endDate,
+        testCommandLine( new ScmBranch( "myBranch" ), startDate, endDate,
                          "cleartool lshistory -fmt \"NAME:%En\\nDATE:%Nd\\nCOMM:%-12.12o - %o - %c - Activity: %[activity]p\\nUSER:%-8.8u\\n\" -recurse -nco -branch myBranch" );
     }
 
     public void testGetCommandLineWithStartDate()
         throws Exception
     {
-        String tag = null;
-
         Date startDate = getDate( 2003, 8, 10 );
 
         Date endDate = null;
 
-        testCommandLine( tag, startDate, endDate,
+        testCommandLine( null, startDate, endDate,
                          "cleartool lshistory -fmt \"NAME:%En\\nDATE:%Nd\\nCOMM:%-12.12o - %o - %c - Activity: %[activity]p\\nUSER:%-8.8u\\n\" -recurse -nco -since 10-Sep-2003" );
     }
 
     public void testGetCommandLineWithTagAndStartDate()
         throws Exception
     {
-        String tag = "myBranch";
-
         Date startDate = getDate( 2003, 8, 10 );
 
         Date endDate = null;
 
-        testCommandLine( tag, startDate, endDate,
+        testCommandLine( new ScmBranch( "myBranch" ), startDate, endDate,
                          "cleartool lshistory -fmt \"NAME:%En\\nDATE:%Nd\\nCOMM:%-12.12o - %o - %c - Activity: %[activity]p\\nUSER:%-8.8u\\n\" -recurse -nco -since 10-Sep-2003 -branch myBranch" );
     }
 
@@ -90,12 +83,12 @@
     //
     // ----------------------------------------------------------------------
 
-    private void testCommandLine( String tag, Date startDate, Date endDate, String commandLine )
+    private void testCommandLine( ScmBranch branch, Date startDate, Date endDate, String commandLine )
         throws Exception
     {
         File workingDirectory = getTestFile( "target/clearcare-changelog-command-test" );
 
-        Commandline cl = ClearCaseChangeLogCommand.createCommandLine( workingDirectory, tag, startDate );
+        Commandline cl = ClearCaseChangeLogCommand.createCommandLine( workingDirectory, branch, startDate );
 
         assertEquals( commandLine, cl.toString() );
     }

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/test/java/org/apache/maven/scm/provider/clearcase/command/checkout/ClearCaseCheckOutCommandTest.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/test/java/org/apache/maven/scm/provider/clearcase/command/checkout/ClearCaseCheckOutCommandTest.java?view=diff&rev=524909&r1=524908&r2=524909
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/test/java/org/apache/maven/scm/provider/clearcase/command/checkout/ClearCaseCheckOutCommandTest.java (original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-clearcase/src/test/java/org/apache/maven/scm/provider/clearcase/command/checkout/ClearCaseCheckOutCommandTest.java Mon Apr  2 13:02:44 2007
@@ -19,6 +19,7 @@
  * under the License.
  */
 
+import org.apache.maven.scm.ScmBranch;
 import org.apache.maven.scm.ScmTestCase;
 import org.codehaus.plexus.util.cli.Commandline;
 
@@ -87,6 +88,6 @@
                           .createConfigSpec( "MYVOB/my/dir", null ) );
         assertEquals( "element * CHECKEDOUT\n" + "element * MYTAG\n" + "element -directory * /main/LATEST\n" +
             "load MYVOB/my/dir\n", ClearCaseCheckOutCommand
-            .createConfigSpec( "MYVOB/my/dir", "MYTAG" ) );
+            .createConfigSpec( "MYVOB/my/dir", new ScmBranch( "MYTAG" ) ) );
     }
 }

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/command/changelog/LocalChangeLogCommand.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/command/changelog/LocalChangeLogCommand.java?view=diff&rev=524909&r1=524908&r2=524909
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/command/changelog/LocalChangeLogCommand.java (original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/command/changelog/LocalChangeLogCommand.java Mon Apr  2 13:02:44 2007
@@ -21,6 +21,7 @@
 
 import org.apache.maven.scm.ChangeFile;
 import org.apache.maven.scm.ChangeSet;
+import org.apache.maven.scm.ScmBranch;
 import org.apache.maven.scm.ScmException;
 import org.apache.maven.scm.ScmFileSet;
 import org.apache.maven.scm.command.changelog.AbstractChangeLogCommand;
@@ -29,7 +30,6 @@
 import org.apache.maven.scm.provider.ScmProviderRepository;
 import org.apache.maven.scm.provider.local.repository.LocalScmProviderRepository;
 import org.codehaus.plexus.util.FileUtils;
-import org.codehaus.plexus.util.StringUtils;
 
 import java.io.File;
 import java.io.IOException;
@@ -47,13 +47,13 @@
     extends AbstractChangeLogCommand
 {
     protected ChangeLogScmResult executeChangeLogCommand( ScmProviderRepository repository, ScmFileSet fileSet,
-                                                          Date startDate, Date endDate, String branch,
+                                                          Date startDate, Date endDate, ScmBranch branch,
                                                           String datePattern )
         throws ScmException
     {
         LocalScmProviderRepository repo = (LocalScmProviderRepository) repository;
 
-        if ( !StringUtils.isEmpty( branch ) )
+        if ( branch != null )
         {
             throw new ScmException( "The local scm doesn't support tags." );
         }

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/command/checkin/LocalCheckInCommand.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/command/checkin/LocalCheckInCommand.java?view=diff&rev=524909&r1=524908&r2=524909
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/command/checkin/LocalCheckInCommand.java (original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/command/checkin/LocalCheckInCommand.java Mon Apr  2 13:02:44 2007
@@ -23,6 +23,7 @@
 import org.apache.maven.scm.ScmFile;
 import org.apache.maven.scm.ScmFileSet;
 import org.apache.maven.scm.ScmFileStatus;
+import org.apache.maven.scm.ScmVersion;
 import org.apache.maven.scm.command.checkin.AbstractCheckInCommand;
 import org.apache.maven.scm.command.checkin.CheckInScmResult;
 import org.apache.maven.scm.provider.ScmProviderRepository;
@@ -47,12 +48,12 @@
     implements LocalCommand
 {
     protected CheckInScmResult executeCheckInCommand( ScmProviderRepository repo, ScmFileSet fileSet, String message,
-                                                      String tag )
+                                                      ScmVersion version )
         throws ScmException
     {
         LocalScmProviderRepository repository = (LocalScmProviderRepository) repo;
 
-        if ( !StringUtils.isEmpty( tag ) )
+        if ( version != null && StringUtils.isNotEmpty( version.getName() ) )
         {
             throw new ScmException( "The local scm doesn't support tags." );
         }

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/command/checkout/LocalCheckOutCommand.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/command/checkout/LocalCheckOutCommand.java?view=diff&rev=524909&r1=524908&r2=524909
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/command/checkout/LocalCheckOutCommand.java (original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/command/checkout/LocalCheckOutCommand.java Mon Apr  2 13:02:44 2007
@@ -23,6 +23,7 @@
 import org.apache.maven.scm.ScmFile;
 import org.apache.maven.scm.ScmFileSet;
 import org.apache.maven.scm.ScmFileStatus;
+import org.apache.maven.scm.ScmVersion;
 import org.apache.maven.scm.command.checkout.AbstractCheckOutCommand;
 import org.apache.maven.scm.command.checkout.CheckOutScmResult;
 import org.apache.maven.scm.provider.ScmProviderRepository;
@@ -30,7 +31,6 @@
 import org.apache.maven.scm.provider.local.metadata.LocalScmMetadataUtils;
 import org.apache.maven.scm.provider.local.repository.LocalScmProviderRepository;
 import org.codehaus.plexus.util.FileUtils;
-import org.codehaus.plexus.util.StringUtils;
 
 import java.io.File;
 import java.io.IOException;
@@ -47,12 +47,13 @@
     extends AbstractCheckOutCommand
     implements LocalCommand
 {
-    protected CheckOutScmResult executeCheckOutCommand( ScmProviderRepository repo, ScmFileSet fileSet, String tag )
+    protected CheckOutScmResult executeCheckOutCommand( ScmProviderRepository repo, ScmFileSet fileSet,
+                                                        ScmVersion version )
         throws ScmException
     {
         LocalScmProviderRepository repository = (LocalScmProviderRepository) repo;
 
-        if ( !StringUtils.isEmpty( tag ) )
+        if ( version != null )
         {
             throw new ScmException( "The local scm doesn't support tags." );
         }

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/command/list/LocalListCommand.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/command/list/LocalListCommand.java?view=diff&rev=524909&r1=524908&r2=524909
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/command/list/LocalListCommand.java (original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/command/list/LocalListCommand.java Mon Apr  2 13:02:44 2007
@@ -23,6 +23,7 @@
 import org.apache.maven.scm.ScmFile;
 import org.apache.maven.scm.ScmFileSet;
 import org.apache.maven.scm.ScmFileStatus;
+import org.apache.maven.scm.ScmVersion;
 import org.apache.maven.scm.command.list.AbstractListCommand;
 import org.apache.maven.scm.command.list.ListScmResult;
 import org.apache.maven.scm.provider.ScmProviderRepository;
@@ -52,10 +53,10 @@
      *
      */
     protected ListScmResult executeListCommand( ScmProviderRepository repo, ScmFileSet fileSet, boolean recursive,
-                                                String tag )
+                                                ScmVersion version )
         throws ScmException
     {
-        if ( !StringUtils.isEmpty( tag ) )
+        if ( version != null )
         {
             throw new ScmException( "The local scm doesn't support tags." );
         }

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/command/update/LocalUpdateCommand.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/command/update/LocalUpdateCommand.java?view=diff&rev=524909&r1=524908&r2=524909
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/command/update/LocalUpdateCommand.java (original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/command/update/LocalUpdateCommand.java Mon Apr  2 13:02:44 2007
@@ -23,17 +23,17 @@
 import org.apache.maven.scm.ScmFile;
 import org.apache.maven.scm.ScmFileSet;
 import org.apache.maven.scm.ScmFileStatus;
+import org.apache.maven.scm.ScmVersion;
 import org.apache.maven.scm.command.changelog.ChangeLogCommand;
 import org.apache.maven.scm.command.update.AbstractUpdateCommand;
 import org.apache.maven.scm.command.update.UpdateScmResult;
 import org.apache.maven.scm.provider.ScmProviderRepository;
 import org.apache.maven.scm.provider.local.command.LocalCommand;
 import org.apache.maven.scm.provider.local.command.changelog.LocalChangeLogCommand;
+import org.apache.maven.scm.provider.local.metadata.LocalScmMetadata;
 import org.apache.maven.scm.provider.local.metadata.LocalScmMetadataUtils;
 import org.apache.maven.scm.provider.local.repository.LocalScmProviderRepository;
-import org.apache.maven.scm.providers.local.metadata.LocalScmMetadata;
 import org.codehaus.plexus.util.FileUtils;
-import org.codehaus.plexus.util.StringUtils;
 
 import java.io.File;
 import java.io.IOException;
@@ -49,12 +49,12 @@
     extends AbstractUpdateCommand
     implements LocalCommand
 {
-    protected UpdateScmResult executeUpdateCommand( ScmProviderRepository repo, ScmFileSet fileSet, String tag )
+    protected UpdateScmResult executeUpdateCommand( ScmProviderRepository repo, ScmFileSet fileSet, ScmVersion version )
         throws ScmException
     {
         LocalScmProviderRepository repository = (LocalScmProviderRepository) repo;
 
-        if ( !StringUtils.isEmpty( tag ) )
+        if ( version != null )
         {
             throw new ScmException( "The local scm doesn't support tags." );
         }



Mime
View raw message