views:

164

answers:

3

I created a customised version of Wordpress for us to use as a template for our web projects, stored in an svn repository.

It has various properties set (ignores, wordpress + plugins as externals) to ease workflow and updates.

My question is, how to use this as a base for others projects / repositories?

  • If you export, it loses all the properties.

  • If you checkout, it is a working copy of the template repository and cannot be imported / committed to a new repository (?)

Should branches be used in this case? It doesn't seem right, as the projects will never be merged back into the template (though I guess some parts might be).

+1  A: 

Import your customized version and SVN copy to a new locations. This works if you plan to develop in the same repo. Otherwise export and import to another repo.

cherouvim
+2  A: 

It is ok to have then as branches. You can keep track of overall updates in the main version, and apply to the branches when appropriate.

Ps. if you still want to use it as a template, there is an already answered question about it: http://stackoverflow.com/questions/680518/is-there-a-way-to-use-an-repository-as-a-template-to-start-a-new-repository

eglasius
OK, I guess this counts as a duplicate question then?
meleyal
Only if you want to start a fresh repository as opposed to a new project in an existing one.
chris
+1  A: 

I would add a bat to your template that sets the required properties with "svn propset" and afterwards deletes itself.

A user would export the template, add the files to a new repository and the run the propset bat.

EDIT:

I meant a batch file. You can look what properties you currently have with svn proplist and svn propget. In your setprop.bat you would then call svn propset, e.g.:

svn propset svn:ignore *.bak dir1
svn propset svn:ignore *.etc dir2
svn propset svn:externals "extdir svn://domain/trunk" .
chris
Could clarify what a bat is?
meleyal
I updated my answer.
chris