1

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.

heshanh
  • 367
  • 3
  • 6
  • 19
  • 1
    As I answered - the best thing you can do here is to use external repository. Specific project changes should be applied with extending base classes (hello OOAD), not with patching. – zerkms Aug 25 '11 at 01:43

2 Answers2

3

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.

zerkms
  • 249,484
  • 69
  • 436
  • 539
2

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.

codenheim
  • 20,467
  • 1
  • 59
  • 80
  • There is no significant difference between centralized and dedicated SCMs in this case. Submodule (for git), nested repository (for mercurial) and externals (for svn). And they behave in **absolutely the same** way. – zerkms Aug 25 '11 at 01:29
  • @zerkms: err... no. SVN externals and Git Submodules don't behave the same: http://stackoverflow.com/questions/3131912/why-are-git-submodules-incompatible-with-svn-externals/3132221#3132221 – VonC Aug 25 '11 at 04:04
  • @VonC: they are pretty similar. In the context of original question I don't see any difference (though I don't disclaim there are). – zerkms Aug 25 '11 at 04:16
  • @zerkms: true. In this context, with no composition involved, SVN external is enough. – VonC Aug 25 '11 at 04:19
  • I agree after consideration. My point was really how easier it is to handle branches and merges with Git & Mercurial vs SVN, but that really isn't specific to DVCS as it is underlying implementation. – codenheim Aug 25 '11 at 04:27