soni
soni

Reputation: 59

svn: '.' is not a working copy

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

Upvotes: 1

Views: 14955

Answers (3)

Moisei
Moisei

Reputation: 1171

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

Upvotes: 0

Sander Rijken
Sander Rijken

Reputation: 21615

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.

Upvotes: 4

pjp
pjp

Reputation: 17629

Did you checkout the files from SVN into your TEST folder?

Upvotes: 0

Related Questions