SVN-ANT Error - "is not a working copy"

add-semi-colons picture add-semi-colons · Dec 23, 2009 · Viewed 7.2k times · Source

I read related question before submitting this question but wasn't able to find the exact question that has the same issue as mine.

I am trying to setup some automation on a windows box. I have ant target to do update and I have used eclipse as my java development editor. Windows box have svn client (TortoiseSVN) installed and I used that to get a fresh checkout from my repository once the project was checked out, I executed the ant target. The result was following.

    C:\svncheckout\Automation>ant update-svn
    Buildfile: build.xml

    update-svn:
          [svn]  started ...
          [svn] svn: 'C:\svncheckout\Automation' is not a working copy
          [svn] svn: Cannot read from 'C:\svncheckout\Automation\.svn\format': C:\svncheck
    out\Automation\.svn\format (The system cannot find the file specified)
          [svn] svn: 'C:\svncheckout\Automation' is not a working copy
          [svn] svn: Cannot read from 'C:\svncheckout\Automation\.svn\format': C:\svncheck
    out\Automation\.svn\format (The system cannot find the file specified)
          [svn]  failed !

    BUILD FAILED
    C:\svncheckout\Automation\build.xml:198: Cannot update dir C:\svncheckout\Automation

Here is my ant target, and after reading some forums I found out that its better to explicitly tell the target to run with svnkit I have removed actual username and password.

<!-- target to update working copy -->
<target name="update-svn">
     <svn svnkit="true" javahl="false" username="guest" password="guest">
         <update dir= "${checkout}/Automation" revision="HEAD"/>
     </svn>
</target>

Thank You in advance.

Answer

Alin picture Alin · Apr 10, 2012

There might be a compatiblity problem between the svn and svnant. For example

svn --version svn, version 1.6.15 (r1038135) compiled Nov 24 2010, 15:10:19

TortoiseSVN 1.6.12, Build 20536 - 32 Bit , 2010/11/24 20:59:01 Subversion 1.6.15, apr 1.3.8 apr-utils 1.3.9 neon 0.29.5 OpenSSL 0.9.8p 16 Nov 2010 zlib 1.2.3

apache-ant 1.7.0\bin\ant -version Apache Ant version 1.7.0 compiled on December 13 2006

Combined with svnant-1.2.1.zip it will generate the error with "working copy" and missing .svn/format file If svnant-1.3.1.zip the issue there's no issue.