tags:

views:

39

answers:

2

Hi,

I am using SVN and have a repository on a remote machine. Sometimes, when working on my local machine I realize that I need to add some new files to the repo. The usual procedure I know would then be:

1- at the current folder on my local machine checkout the whole SVN repo 2- enter there 3- copy the interesting file here 4- commit

But this can be a bit tedious. I wonder if somehow, I can omit steps 1 to 3 and import the "interesting" file to SVN directly without necessity of checking out the repo first.

Thanks

+5  A: 

Perhaps svn import is what you want ? Check the documentation for details.

High Performance Mark
+1 only thing is he has to do svn import for each file seperately if they are at different locations. Thanks
Mahesh Velaga
Hi HPM, sorry if my explanation was not clear. If I do not checkout repo, how can I import the file to the repo? I tried svn import new_file http:.....repo , but it does not work, it says it does not find svn environemtn variables
Werner
You can pass those environmental variables on the command line, check the usage. It's probably looking for svn host and port, and username and password. 'svn help import'
Andrew B
A: 

You can checkout only the folder where the new files go, add the new files and commit.

Seems to me like what you're doing is dangerous. If you don't update from SVN first and re-compile the code, you might be introducing bugs or break the build. Maybe the interface of that class you're using has changed in the repository!

Martin
i work with independent text files, not with a program's source code
Werner
Adding a file to the repository would not break the build...it is a common use case and there is a specific command, `svn import`, to do so.
Michael Hackner