I'm exploring the automation of Subversion (SVN) commits.
I just imported the directory into Subversion using
svn import C:\sourcedir http://[my svn location] -m Message
This worked fine.
After modification I tried to commit the changes with:
svn add --depth=infinity --force *
svn commit -m Message
Unfortunately I get the error
svn: E155007: 'E:\sql' is not a working copy
This is correct; in Explorer using TortoiseSVN there are no icons either.
What am I missing? Why isn't my folder a working copy after importing it into Subversion?
The SVN import command is a quick way to copy an unversioned tree of files into a repository, creating intermediate directories as necessary. SVN import doesn't require a working copy, and your files are immediately committed to the repository.
But in order to do svn add
or svn commit
, you should be inside the working directory. First you have to check out the files from SVN, then modify it as per the requirement, then svn add
and svn commit
from the working directory should work.
Import does not imply converting the folder to be the working copy. That's how SVN rolls. If you want a working copy then do a checkout after import. If you want a working copy in the same folder then rename original folder, create new with the same name, and do a checkout there.
If you have huge amount of data, and don't want to spend time in needless transfers then don't import at all. Create empty working copy (either import an empty folder structure and do a checkout, OR create empty repository directly on SVN server and do a checkout), move your big files there, and then do a single commit.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With