开发者

Is Subversion's 'Lazy Copy' still lazy when overwriting a previously deleted file?

开发者 https://www.devze.com 2022-12-26 05:05 出处:网络
Is Subversion\'s \'Lazy Copy\' still lazy when overwriting a previously deleted file? I store my externals in a separate folder for each version: i.e say for dojo I\'d have:

Is Subversion's 'Lazy Copy' still lazy when overwriting a previously deleted file?

I store my externals in a separate folder for each version: i.e say for dojo I'd have:

 webroot\
  scripts\
   dojo-v-1.0.0\
   dojo-v-1.1.0\

etc. By doing this, for me at least, I feel it makes it easier to switch over to a new version.

By only adding each new version i am not really giving svn the history it needs to do lazy copies. So one tactic I have used is to

  • svn copy over the old version over to where the new one will be
  • then svn delete that whole folder
  • then unpack my newer v开发者_开发百科ersion into that place
  • then svn add them

The idea is to avoid having a massive amount of duplicated data in my repo.

I hope svn is looking at the new files and saying,

"hey, i already had this once, copied, then deleted...so i am going to be lazy and only store the changes".

That was my theory - but does that happen in practice?

p.s. Yes I know an alternative is to set the 'externals properties on the folder' - but that's another question.


You should read the chapter "vendor branches" in subversion book, because this is exactly what they are about.

To answer your question:

No, subversion will not use a lazy copy on new added files in your described scenario.

If you want to avoid this, use load_dirs.pl (which is also described in vendor branches chapter)

0

精彩评论

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