Search code examples
svnbranchparentignore

SVN ignore file in parent branches


I want certain files/folders to be version controlled at a certain "level" branches and below (meaning branches that are branched from that branch) but want to ignore them upward. Can I achieve this?

Rephrasing: I have multiple projects which are fairly similar, but differ in certain files (1-2 files). I would like to have a main branch for all the common stuff and have branches to keep the special behavior. This way I could easily merge fixes between the projects via a common ancestor but also manage the special aspects of them (and versioning them). Is this achievable?

Example:

  • Root (Not a full project):
    • 1
    • 2
  • Project A (parent: Root):
    • 1
    • 2
    • q
  • Project B (parent: Root):
    • 1
    • 2
    • w

Solution

  • Eventually I settled on the 'external approach':

    All common stuff is in master, all projects branch from master and there is an external folder added which has a relative path in the repo. The project specifics are put in this folder which is another repo on itself, only available in their respective project repo.

    master
    project1
    |-specific
      |-spec
    |-trunk (parent is master)
      |-spec: external ../specific/spec
    project2
    |-specific
      |-spec
    |-trunk (parent is master)
      |-spec: external ../specific/spec
    

    So all merges between the common parts are possible and no project specific components end up in other projects. Side effect: the master cannot be used on it's own.