Return-Path: X-Original-To: apmail-maven-commits-archive@www.apache.org Delivered-To: apmail-maven-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 70903C195 for ; Sun, 25 May 2014 20:26:21 +0000 (UTC) Received: (qmail 57838 invoked by uid 500); 25 May 2014 20:26:21 -0000 Delivered-To: apmail-maven-commits-archive@maven.apache.org Received: (qmail 57771 invoked by uid 500); 25 May 2014 20:26:21 -0000 Mailing-List: contact commits-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@maven.apache.org Delivered-To: mailing list commits@maven.apache.org Received: (qmail 57640 invoked by uid 99); 25 May 2014 20:26:21 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 25 May 2014 20:26:21 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id D08CB9A48E7; Sun, 25 May 2014 20:26:20 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: hboutemy@apache.org To: commits@maven.apache.org Date: Sun, 25 May 2014 20:26:21 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [2/2] git commit: code simplification 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 Authored: Sun May 25 22:26:16 2014 +0200 Committer: Hervé Boutemy 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;