maven-scm git commit: add a new method to ease checkout with more parameters

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

maven-scm git commit: add a new method to ease checkout with more parameters

olamy
Repository: maven-scm
Updated Branches:
  refs/heads/master 1ab4a7b16 -> 6f7dd0c6e


add a new method to ease checkout with more parameters

Signed-off-by: olivier lamy <[hidden email]>


Project: http://git-wip-us.apache.org/repos/asf/maven-scm/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-scm/commit/6f7dd0c6
Tree: http://git-wip-us.apache.org/repos/asf/maven-scm/tree/6f7dd0c6
Diff: http://git-wip-us.apache.org/repos/asf/maven-scm/diff/6f7dd0c6

Branch: refs/heads/master
Commit: 6f7dd0c6eebab9da4899b489e8d78ba6ce6195bf
Parents: 1ab4a7b
Author: olivier lamy <[hidden email]>
Authored: Sat Dec 2 11:32:40 2017 +1100
Committer: olivier lamy <[hidden email]>
Committed: Sat Dec 2 11:32:40 2017 +1100

----------------------------------------------------------------------
 .../maven/scm/provider/AbstractScmProvider.java      | 10 ++++++++++
 .../org/apache/maven/scm/provider/ScmProvider.java   | 15 +++++++++++++++
 .../apache/maven/scm/provider/ScmProviderStub.java   |  8 ++++++++
 pom.xml                                              |  1 +
 4 files changed, 34 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-scm/blob/6f7dd0c6/maven-scm-api/src/main/java/org/apache/maven/scm/provider/AbstractScmProvider.java
----------------------------------------------------------------------
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/provider/AbstractScmProvider.java b/maven-scm-api/src/main/java/org/apache/maven/scm/provider/AbstractScmProvider.java
index 5718770..e0dfb41 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/provider/AbstractScmProvider.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/provider/AbstractScmProvider.java
@@ -497,6 +497,16 @@ public abstract class AbstractScmProvider
         return checkout( repository.getProviderRepository(), fileSet, parameters );
     }
 
+    @Override
+    public CheckOutScmResult checkOut( ScmRepository repository, ScmFileSet fileSet, ScmVersion scmVersion,
+                                       CommandParameters commandParameters )
+        throws ScmException
+    {
+        login( repository, fileSet );
+
+        return checkout( repository.getProviderRepository(), fileSet, commandParameters );
+    }
+
     protected CheckOutScmResult checkout( ScmProviderRepository repository, ScmFileSet fileSet,
                                           CommandParameters parameters )
         throws ScmException

http://git-wip-us.apache.org/repos/asf/maven-scm/blob/6f7dd0c6/maven-scm-api/src/main/java/org/apache/maven/scm/provider/ScmProvider.java
----------------------------------------------------------------------
diff --git a/maven-scm-api/src/main/java/org/apache/maven/scm/provider/ScmProvider.java b/maven-scm-api/src/main/java/org/apache/maven/scm/provider/ScmProvider.java
index 9bdb893..a698f5a 100644
--- a/maven-scm-api/src/main/java/org/apache/maven/scm/provider/ScmProvider.java
+++ b/maven-scm-api/src/main/java/org/apache/maven/scm/provider/ScmProvider.java
@@ -493,6 +493,21 @@ public interface ScmProvider
         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 commandParameters parameters
+     * @return
+     * @throws ScmException if any
+     * @since 1.9.6
+     */
+    CheckOutScmResult checkOut( ScmRepository scmRepository, ScmFileSet scmFileSet, ScmVersion version , //
+                                CommandParameters commandParameters )
+        throws ScmException;
+
+    /**
      * Create a diff between two branch/tag/revision.
      *
      * @param scmRepository the source control system

http://git-wip-us.apache.org/repos/asf/maven-scm/blob/6f7dd0c6/maven-scm-test/src/main/java/org/apache/maven/scm/provider/ScmProviderStub.java
----------------------------------------------------------------------
diff --git a/maven-scm-test/src/main/java/org/apache/maven/scm/provider/ScmProviderStub.java b/maven-scm-test/src/main/java/org/apache/maven/scm/provider/ScmProviderStub.java
index b8266a6..9edf2c2 100644
--- a/maven-scm-test/src/main/java/org/apache/maven/scm/provider/ScmProviderStub.java
+++ b/maven-scm-test/src/main/java/org/apache/maven/scm/provider/ScmProviderStub.java
@@ -592,6 +592,14 @@ public class ScmProviderStub
         return getCheckOutScmResult();
     }
 
+    @Override
+    public CheckOutScmResult checkOut( ScmRepository scmRepository, ScmFileSet scmFileSet, ScmVersion version,
+                                       CommandParameters commandParameters )
+        throws ScmException
+    {
+        return getCheckOutScmResult();
+    }
+
     /**
      * {@inheritDoc}
      */

http://git-wip-us.apache.org/repos/asf/maven-scm/blob/6f7dd0c6/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 58e93f2..8fb67ea 100644
--- a/pom.xml
+++ b/pom.xml
@@ -137,6 +137,7 @@
     <maven.site.path>scm-archives/scm-LATEST</maven.site.path>
     <checkstyle.violation.ignore>RedundantThrows,NewlineAtEndOfFile,ParameterNumber,MethodLength,FileLength,InnerAssignment,MagicNumber</checkstyle.violation.ignore>
     <checkstyle.failOnViolation>false</checkstyle.failOnViolation>
+    <javaVersion>7</javaVersion>
   </properties>
 
   <dependencyManagement>