开发者

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.


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜