4

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.

Denny Weinberg
  • 2,492
  • 1
  • 21
  • 34

2 Answers2

4

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.

bahrep
  • 29,961
  • 12
  • 103
  • 150
0

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.

Community
  • 1
  • 1
Denny Weinberg
  • 2,492
  • 1
  • 21
  • 34