I want to add a directory to subversion.My folder structure is given below

ParentFolder
DeviceFolder1---->File1
DeviceFolder2----->File2

DeviceFolder2 is under the subversion https://SubversionURL/DeviceFolder2.I want to add DeviceFolder1 to subversion https://SubversionURL/DeviceFolder1.Here both

ParentFolder and DeviceFolder1 are not under subversion and https://SubversionURL/DeviceFolder1 doesn't exist. What are the steps that I should follow while adding DeviceFolder1 to subversion

Note:
I couldn't perform svn add because the parent directory is not a subversion directory.DeviceFolder2 is a checked out directory under subversion https://SubversionURL/DeviceFolder2 but DeviceFolder1 is a folder created in the local machine and I want to add it to subversion url https://SubversionURL/DeviceFolder1.

Can you use subprocess or do you want a Python API?
–
tjamesonNov 26 '12 at 5:28

no i want the svn command for adding a directory to subversion. A command like svn add
–
user1654136Nov 26 '12 at 5:32

Are you using SVN 1.7 or earlier? This matters, since in previous SVN versions where metadata was stored per folder, it was possible to attach a working copy under parent working copy, but in 1.7 this is no longer possible.
–
msellNov 26 '12 at 6:20

then your question has nothing to do with Python. You are simply asking for SVN commands. Can you fix your question and retag it accordingly?
–
Adrian ShumNov 26 '12 at 6:21

To use svn add, you need to be in a source controlled folder. Since you aren't, you can't just add it. Svn would have no idea where to add it to. You should consider creating your DeviceFolder1 on the server first and follow the steps detailed in Rachel Sanders' answer below.
–
J. SteenNov 26 '12 at 6:31

One trap: If you want your local DeviceFolder1 to be an SVN working copy after you've imported stuff, you'll need to delete your existing directory and check out a new working copy. SVN won't let you check out to a non-empty directory, AFAIK.

i couldn't perform svn add because the parent directory is not a subversion directory.DeviceFolder2 is a checkedout directory but DeviceFolder1 is a folder created in the local machine and i want it to add to subversion url 'SubversionURL/DeviceFolder1';
–
user1654136Nov 26 '12 at 5:57