maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbout...@apache.org
Subject [2/2] git commit: code simplification
Date Sun, 25 May 2014 20:26:21 GMT
code simplification

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

Branch: refs/heads/master
Commit: f1b4415b845cab3bc77517756e61aef19aaf4f3c
Parents: 8e0239e
Author: Hervé Boutemy <hboutemy@apache.org>
Authored: Sun May 25 22:26:16 2014 +0200
Committer: Hervé Boutemy <hboutemy@apache.org>
Committed: Sun May 25 22:26:16 2014 +0200

----------------------------------------------------------------------
 .../scm/provider/tfs/command/TfsCheckInCommand.java   | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-scm/blob/f1b4415b/maven-scm-providers/maven-scm-provider-tfs/src/main/java/org/apache/maven/scm/provider/tfs/command/TfsCheckInCommand.java
----------------------------------------------------------------------
diff --git a/maven-scm-providers/maven-scm-provider-tfs/src/main/java/org/apache/maven/scm/provider/tfs/command/TfsCheckInCommand.java
b/maven-scm-providers/maven-scm-provider-tfs/src/main/java/org/apache/maven/scm/provider/tfs/command/TfsCheckInCommand.java
index a04dcb8..f16a5cc 100644
--- a/maven-scm-providers/maven-scm-provider-tfs/src/main/java/org/apache/maven/scm/provider/tfs/command/TfsCheckInCommand.java
+++ b/maven-scm-providers/maven-scm-provider-tfs/src/main/java/org/apache/maven/scm/provider/tfs/command/TfsCheckInCommand.java
@@ -32,15 +32,13 @@ import org.apache.maven.scm.provider.tfs.command.consumer.FileListConsumer;
 public class TfsCheckInCommand
     extends AbstractCheckInCommand
 {
-    private static String policiesArgument = "/override:checkin_policy";
-
     protected CheckInScmResult executeCheckInCommand( ScmProviderRepository r, ScmFileSet
f, String m, ScmVersion v )
         throws ScmException
     {
         TfsCommand command = createCommand( r, f, m );
         FileListConsumer fileConsumer = new FileListConsumer();
         ErrorStreamConsumer err = new ErrorStreamConsumer();
-        
+
         int status = command.execute( fileConsumer, err );
         if ( status != 0 || err.hasBeenFed() )
         {
@@ -59,12 +57,12 @@ public class TfsCheckInCommand
             command.addArgument( "-comment:" + m + "" );
         }
         command.addArgument( f );
-        
-        TfsScmProviderRepository tfsScmProviderRepo = ( TfsScmProviderRepository )r;
-        if( tfsScmProviderRepo.isUseCheckinPolicies() )
+
+        TfsScmProviderRepository tfsScmProviderRepo = (TfsScmProviderRepository) r;
+        if ( tfsScmProviderRepo.isUseCheckinPolicies() )
         {
-            //handle TFS-policies (by adding "/override:";Auto-Build: Version Update";)
-            command.addArgument( policiesArgument );
+            // handle TFS-policies (by adding "/override:";Auto-Build: Version Update";)
+            command.addArgument( "/override:checkin_policy" );
         }
 
         return command;


Mime
View raw message