Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SVN commit without checkout or working copy

Tags:

commit

svn

perl

I am working on a perl script which has to commit a new file every 10 minutes from my hard drive.

I was wondering if it is possible to perform a commit without having the working copy of the project whose commit I want to perform? Is it necessary to have a working copy of that project checked out on my hard drive before performing the commit?

like image 707
vishalkbhatt Avatar asked Oct 20 '11 06:10

vishalkbhatt


2 Answers

If this directory contains many other files with much content, a solution would be to do a shallow checkout.

svn checkout <url> <target> --depth empty
cd <target>
svn up <yourfile>

Edit your file...

svn commit <yourfile>

If you use an older version of subversion, you will probably find what you look for in this post.

like image 126
Antoine Avatar answered Oct 03 '22 00:10

Antoine


If it is a new file you can use the svn import command to directly import it into a particular folder in your repository

http://svnbook.red-bean.com/en/1.5/svn.ref.svn.c.import.html

like image 35
manojlds Avatar answered Oct 03 '22 01:10

manojlds