Using the SVN task from tigris I can't seem to find a way to just commit one file. Is there any way to do this without first having to checkout the folder in SVN?

Was it helpful?


No. You cannot check in a single file w/o having a working copy which means you will have to checkout at least one directory.

Perhaps I don't fully understand, but you cannot check in a single file with the svn binaries so you certainly can't do it through ant.


This post has some information about committing a file with checking it out first.

If you can also provide WebDAV access to the subversion repository, you could then use curl to upload a single file to the repository without having a working copy. You won't have a useful commit message, etc., so use with caution.

In svnant you can commit an unversioned file or tree into the repository with <import/> task

put subversion/bin into your PATH and write own ant task like

<macrodef name="svn_call">
  <attribute name="src.path" />
  <attribute name="dst.path" />
  <attribute name="command" />
    <exec failonerror="true" executable="${env.SVN_HOME}/bin/svn" osfamily="windows">
    <arg line="@{command} @{src.path} @{dst.path}" />
    <exec failonerror="true" executable="${env.SVN_HOME}/bin/svn" osfamily="unix">
    <arg line="@{command} @{src.path} @{dst.path}" />
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow