Denis Biondic
Denis Biondic

Reputation: 8201

SVN and moving large files between projects

Lets say I have project A on SVN server, and it has some large file.

Lets say I create a new project B, but it is actually a copy of project A. I create it, import it on the SVN server (different folder / URL), and I start with a new revision history.

The problem is, that new project has that same large file - can I somehow reuse that large file from project A, by perhaps moving it, so that I don't have to transfer it over the network? I want SVN to be able to say: "Oh, this is the same file, you don't need to commit that"

After everything, I want to delete project A.

Upvotes: 0

Views: 253

Answers (2)

zellus
zellus

Reputation: 9592

Lets say I create a new project B, but it is actually a copy of project A.

svn cp http://path/to/repo/A/ http://path/to/repo/B/

This is actually what version control is all about. Subversion makes cheap copies, by just creating references, if the files are equal.

Upvotes: 1

BryanH
BryanH

Reputation: 6062

If you didn't want to delete project "A" then you could use the large file as an external.

It sounds like you don't want to move the file over the network, but you want to move it into another repository. So, do it all on your SVN server:

  • Check out "A" and "B"
  • Copy the large file into the "B" working directory,
  • svn add
  • svn ci

Done.

Upvotes: 0

Related Questions