开发者

Can SVN do this or should i move to Git

We have an in-house CMS, and currently we check out the base copy of this, and resubmit as a new repo and make changes to it. if these changes are to the core we have to copy the files over to开发者_开发百科 the base copy, or if we make copies to the core we have to copy the changes to each project.

what we are trying to do for a new project is:

  1. check out a copy of the base project
  2. check it in as a new repo
  3. make any project specific changes to the #2
  4. make any core changes to the basecopy and update the copies we checked out from that

so 1 base, multiple repos from the base, update the base and push the updates to the repos.

But we dont want the base to be updated from the respos we made from it.

is this possible?

===== update =====

after doing more googeling, can i use the branching feature in svn to do this?

have each new project branch out from the base, that way if we need to push changes from base to all the projects we can still do it. And we can make project specific changes to each of the branches.


Yes, you can do that. It is called svn:externals property.

So create separated repository for core files only and plug it in to your other project as an external one.


Hmm, sounds like a job for a DVCS like Git or Mercurial. Not so much that DVCS is better here, but that the current available implementations handle branching and merging better than SVN in my experience. With Git or Mercurial you can setup nice intra-repository merges, no hierarchy enforced. But mainly from your requirement of not updating the base with certain changes from the copies (so seems you want selective updates).

Yes SVN could do it. Maybe if you never commit the changes to your "new repo" to the base.

On the contrary, with a DCVS, it is very flexible how you push what, when and where. :)

EDIT: I knew little about svn:externals, check zerkms answer as it seems to fit.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜