From issues-return-132399-archive-asf-public=cust-asf.ponee.io@maven.apache.org Tue May 8 11:11:10 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 3FE0F18063B for ; Tue, 8 May 2018 11:11:10 +0200 (CEST) Received: (qmail 30833 invoked by uid 500); 8 May 2018 09:11:09 -0000 Mailing-List: contact issues-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 issues@maven.apache.org Received: (qmail 30817 invoked by uid 99); 8 May 2018 09:11:08 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 May 2018 09:11:08 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 26127C018B for ; Tue, 8 May 2018 09:11:08 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.511 X-Spam-Level: X-Spam-Status: No, score=-109.511 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id pZJdIwfQWsE0 for ; Tue, 8 May 2018 09:11:06 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 5BAD65F3BA for ; Tue, 8 May 2018 09:11:06 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id AA105E12DA for ; Tue, 8 May 2018 09:11:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 3DBC62129C for ; Tue, 8 May 2018 09:11:00 +0000 (UTC) Date: Tue, 8 May 2018 09:11:00 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@maven.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SCM-714) mvn release:prepare fails if the command line is too long on windows MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SCM-714?page=3Dcom.atlassian.ji= ra.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1646712= 7#comment-16467127 ]=20 ASF GitHub Bot commented on SCM-714: ------------------------------------ murinrad closed pull request #71: SCM-714: mvn release:prepare fails if the= command line is too long on=E2=80=A6 URL: https://github.com/apache/maven-scm/pull/71 =20 =20 =20 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/maven-scm-providers/maven-scm-providers-git/maven-scm-provider= -gitexe/src/main/java/org/apache/maven/scm/provider/git/gitexe/command/chec= kin/GitCheckInCommand.java b/maven-scm-providers/maven-scm-providers-git/ma= ven-scm-provider-gitexe/src/main/java/org/apache/maven/scm/provider/git/git= exe/command/checkin/GitCheckInCommand.java index e30aae0c3..b9622797c 100644 --- a/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe= /src/main/java/org/apache/maven/scm/provider/git/gitexe/command/checkin/Git= CheckInCommand.java +++ b/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-gitexe= /src/main/java/org/apache/maven/scm/provider/git/gitexe/command/checkin/Git= CheckInCommand.java @@ -38,6 +38,7 @@ import org.apache.maven.scm.provider.git.gitexe.command.status.GitStatusCo= mmand; import org.apache.maven.scm.provider.git.gitexe.command.status.GitStatusCo= nsumer; import org.codehaus.plexus.util.FileUtils; +import org.codehaus.plexus.util.Os; import org.codehaus.plexus.util.cli.CommandLineUtils; import org.codehaus.plexus.util.cli.Commandline; =20 @@ -45,6 +46,7 @@ import java.io.IOException; import java.net.URI; import java.util.ArrayList; +import java.util.Collections; import java.util.List; =20 /** @@ -66,7 +68,7 @@ protected CheckInScmResult executeCheckInCommand( ScmProv= iderRepository repo, Sc CommandLineUtils.StringStreamConsumer stderr =3D new CommandLineUt= ils.StringStreamConsumer(); CommandLineUtils.StringStreamConsumer stdout =3D new CommandLineUt= ils.StringStreamConsumer(); =20 - int exitCode; + int exitCode =3D -1; =20 File messageFile =3D FileUtils.createTempFile( "maven-scm-", ".com= mit", null ); try @@ -86,9 +88,28 @@ protected CheckInScmResult executeCheckInCommand( ScmPro= viderRepository repo, Sc // if specific fileSet is given, we have to git-add them f= irst // otherwise we will use 'git-commit -a' later =20 - Commandline clAdd =3D GitAddCommand.createCommandLine( fil= eSet.getBasedir(), fileSet.getFileList() ); + Commandline clAdd =3D null; =20 - exitCode =3D GitCommandLineUtils.execute( clAdd, stdout, s= tderr, getLogger() ); + //SCM-714: Workaround for the Windows terminal command lim= it + if ( Os.isFamily( Os.FAMILY_WINDOWS ) )=20 + { + for ( File file: fileSet.getFileList() )=20 + { + clAdd =3D GitAddCommand.createCommandLine( fileSet= .getBasedir(),=20 + Collectio= ns.singletonList( file ) ); + exitCode =3D GitCommandLineUtils.execute( clAdd, s= tdout, stderr, getLogger() ); + =20 + if ( exitCode !=3D 0 )=20 + { + break; + } + } + }=20 + else=20 + { + clAdd =3D GitAddCommand.createCommandLine( fileSet.get= Basedir(), fileSet.getFileList() ); + exitCode =3D GitCommandLineUtils.execute( clAdd, stdou= t, stderr, getLogger() ); + } =20 if ( exitCode !=3D 0 ) { @@ -248,11 +269,6 @@ public static Commandline createCommitCommandLine( Git= ScmProviderRepository repo // commit all tracked files cl.createArg().setValue( "-a" ); } - else - { - // specify exactly which files to commit - GitCommandLineUtils.addTarget( cl, fileSet.getFileList() ); - } =20 if ( GitUtil.getSettings().isCommitNoVerify() ) { =20 ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. =20 For queries about this service, please contact Infrastructure at: users@infra.apache.org > mvn release:prepare fails if the command line is too long on windows > -------------------------------------------------------------------- > > Key: SCM-714 > URL: https://issues.apache.org/jira/browse/SCM-714 > Project: Maven SCM > Issue Type: Bug > Components: maven-scm-provider-gitexe > Affects Versions: 1.8.1 > Reporter: Felix Simmendinger > Assignee: Robert Scholte > Priority: Blocker > > The issue from SCM-697 does not solve the issue as the gitprovider is not= using the add command but the checkin command during a release. -- This message was sent by Atlassian JIRA (v7.6.3#76005)