Denny Weinberg
Denny Weinberg

Reputation: 2606

SVN import existing file

Is it possible to use svn import with a file that exists already?

Currently as workaround I do svn remove and than svn import. But the problem is that I have two revision numbers (two commits) and the entire diff is stored on svn server side instead of only the diff of the two files.

I don't want to make a checkout to have a solution for that.

Upvotes: 4

Views: 801

Answers (2)

Denny Weinberg
Denny Weinberg

Reputation: 2606

Maybe this will help someone: I cannot use svnmucc due to server infrastructure reasons.

Here is an alternative: Checkout one file from Subversion Solution: Create an empty checkout, update the single file, modify it and commit it.

svn checkout <url_of_big_dir> <target> --depth empty
cd <target>
svn up <file_you_want>

Source and "copyright": See link abowe.

Upvotes: 0

bahrep
bahrep

Reputation: 30662

Use svnmucc put SRC-FILE URL.

E.g. run the following command:

svnmucc put C:\test\myfile.txt https://svn.example.com/repos/myfile.txt -m "My Commit Message"

Read about svnmucc tool in SVNBook | svnmucc Reference—Subversion Multiple URL Command Client.

Upvotes: 5

Related Questions