Sunday, March 20, 2011

svn: '.' is not a working copy

Hi All, Iam getting the below error when iam trying to execute a batch file

ROBOCOPY "C:\test" "C:\test\Source" "*" /E  /NP /V /R:3 /XD "bin" "obj" /XF "*.pj" > %log%
svn add * --force %SVNOPTIONS% >>%log%
svn commit -m "Checking in Files" %SVNOPTIONS% >>%log%
svn info -r head >%REVISION_COMMIT%

Please let me know how to resolve this

svn: '.' is not a working copy
svn: Can't open file '.svn\entries': The system cannot find the path specified.
svn: 'C:\test' is not a working copy
svn: '.' is not a working copy
From stackoverflow
  • Did you checkout the files from SVN into your TEST folder?

    soni : Yes i have done that.
    soni : Again i wanted copy the contents of source to svn working path and if any new files and changed files should be added to svn repo. But Robocopy is working fine, but iam getting this error.
  • The reason is that "*" doesn't evaluate to hidden files and folders. That means your .svn directories containing the administrative area of the working copy aren't copied.

    Skipping the "*" alltogether should work:

    ROBOCOPY "C:\test" "C:\test\Source" /E  /NP /V /R:3 /XD "bin" "obj" /XF "*.pj" > %log%

    Edit: This assumes test is a working copy, and test\Source isn't. I'm not sure what your current situation is.

  • The error is clear: Your current path is not C:\test\Source but c:\test, (svn: 'C:\test' is not a working copy) Thus, you either add pushd C:\temp\Source to your script or you change it to svn add C:\temp\Source* --force %SVNOPTIONS% >>%log% svn commit C:\temp\Source -m "Checking in Files" %SVNOPTIONS% >>%log%

    Note, if C:\temp\Source is not a working copy, i.e it does not refer to any location at svn repository, then you have to prepare it first: Given you would like to add your files to svn://svnserver/trunk/Source folder, you have to run missing following command: svn checkout svn://svnserver/trunk/Source C:\temp\Source


Post a Comment