views:

1107

answers:

4

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.

A: 

The error message says it all, really. Your C:\svncheckout\Automation is not a working copy. To verify that, you can check whether the C:\svncheckout\Automation\.svn\format exists (and it probably doesn't.)

Which folder did you checkout to?

Could it be that you performed an export operation instead of checkout? Or that the .svn folder got deleted somehow?

Could it be that you checked out to a different folder (not C:\svncheckout\Automation)?

Could it be that the Automation folder doesn't exist in the repository? (You can check with TortoiseSVN's Repo-Browser.)

Eli Acherkan
A: 

i work in linux and i can not create the working copy??? i just install SVN

raghda
A: 

I had the same problem. In my case it could be solved by simply switching to javahl.

<svn svnkit="false" javahl="true">
    <update dir="${source.dir}" revision="HEAD" />
</svn>        

Edit: I think the general problem is rooted in the workspace being created with a newer version of subversion compared to the library used in ant, in your case SVNKit. I guess that on my system javahl is present in a recent enough version, whereas SVNKit isn't - so that switching to javahl solved my problem. You can probably solve your problem by updating the SVNKit libraries used by your ant skript. This post at tigris also points in that direction.

zb
A: 

Previous answer says to switch to javahl but it created be ton of problem so in my experience the best solution is to turn off javahl.

enter code here

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

I have added the cleanup just svn cleanup because my ant script is running to take care automation process in hudson. So to avoid any cleanup process I decided to add that.