Import into Subversion
February 1, 2009 3:09 PM   Subscribe

How do I import a single file with Subversion?

Sometimes it's convenient to use Subversion without doing a full-blown checkout and creating a .svn file and all that. For example, I can successfully export a single file as follows:

svn export http://blahblah.cvsdude.com/repo/somefile.c

which simply grabs a copy of somefile.c without any fuss. I'd like to do the same, in reverse. I tried

svn import -m "comment" otherfile.c http://blahblah.cvsdude.com/repo

but I get the error
svn: Path 'http://blahblah.cvsdude.com/repo' already exists

which means I'm confused, because my reaction is "Of course it already exists!"

Help please.
posted by iconjack to Computers & Internet (3 answers total) 2 users marked this as a favorite
 
Best answer: Isn't your problem that you need to tell subversion where in the repository you'd like to check the file in? Perhaps you can try:

svn import -m "comment" otherfile.c http://blahblah.cvsdude.com/repo/otherfile.c
posted by ooga_booga at 3:15 PM on February 1, 2009


Response by poster: Works! Thanks.
Didn't occur to me that I needed to give the destination file name.
posted by iconjack at 3:22 PM on February 1, 2009


Also if you're trying to do that kind of thing, I really suggest that you use git. It's a lot lower friction than svn.
posted by singingfish at 12:13 AM on February 2, 2009


« Older Mac screen artifacts causing a headache   |   Toilet seats! Newer »
This thread is closed to new comments.