[ 
https://issues.apache.org/jira/browse/SCM-881?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16436737#comment-16436737
 ] 

ASF GitHub Bot commented on SCM-881:
------------------------------------

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:
us...@infra.apache.org


> ScmWagon has no way to work with SVN in binary mode
> ---------------------------------------------------
>
>                 Key: SCM-881
>                 URL: https://issues.apache.org/jira/browse/SCM-881
>             Project: Maven SCM
>          Issue Type: Bug
>          Components: maven-scm-provider-cvs
>    Affects Versions: 1.9.5
>            Reporter: Ilya Basin
>            Assignee: Olivier Lamy (*$^¨%`£)
>            Priority: Major
>             Fix For: 1.9.6
>
>
> In some configurations svn will automatically add the svn:eol-style property 
> to newly added text files. ScmWagon needs to perform the add command without 
> adding automatic properties.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to