maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] olamy closed pull request #68: [SCM-881] svn add in binary mode when requested
Date Fri, 13 Apr 2018 03:15:12 GMT
olamy closed pull request #68: [SCM-881] svn add in binary mode when requested
URL: https://github.com/apache/maven-scm/pull/68
 
 
   

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-svn/maven-scm-provider-svnexe/src/main/java/org/apache/maven/scm/provider/svn/svnexe/command/add/SvnAddCommand.java
b/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svnexe/src/main/java/org/apache/maven/scm/provider/svn/svnexe/command/add/SvnAddCommand.java
index 9d5f1d0e1..eb8ced780 100644
--- a/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svnexe/src/main/java/org/apache/maven/scm/provider/svn/svnexe/command/add/SvnAddCommand.java
+++ b/maven-scm-providers/maven-scm-providers-svn/maven-scm-provider-svnexe/src/main/java/org/apache/maven/scm/provider/svn/svnexe/command/add/SvnAddCommand.java
@@ -49,12 +49,6 @@ protected ScmResult executeAddCommand( ScmProviderRepository repository,
ScmFile
                                            boolean binary )
         throws ScmException
     {
-        // TODO: could do this with propset?
-        if ( binary )
-        {
-            throw new ScmException( "This provider does not yet support binary files" );
-        }
-
         if ( fileSet.getFileList().isEmpty() )
         {
             throw new ScmException( "You must provide at least one file/directory to add"
);
@@ -62,6 +56,12 @@ protected ScmResult executeAddCommand( ScmProviderRepository repository,
ScmFile
 
         Commandline cl = createCommandLine( fileSet.getBasedir(), fileSet.getFileList() );
 
+        if ( binary )
+        {
+            cl.createArg().setValue( "--config-option" );
+            cl.createArg().setValue( "config:miscellany:enable-auto-props=no" );
+        }
+
         SvnAddConsumer consumer = new SvnAddConsumer( getLogger() );
 
         CommandLineUtils.StringStreamConsumer stderr = new CommandLineUtils.StringStreamConsumer();


 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message