0

If I have a program and a set of example data that I want to distribute on SVN (separately so people who are familiar with the code need not get the example data with it), what's the best way to do this? Can I put that in a "branch"? Or should I put the code + examples in the branch and somehow keep the trunk and branch code synchronized?

Thanks! SVN noob

hatmatrix
  • 115
  • 5

1 Answers1

1

You put the code and examples in two separate directories with a common parent. So your project might look like:

 .../myproject/
   myproject-code/
   myproject-examples/

Subversion lets one check out subdirectories of a repository. For example, someone who wanted just the code could do this:

$ svn co http://example.com/svn/myproject/myproject-code/

Someone who wanted both would check out the parent.

larsks
  • 43,623
  • 14
  • 121
  • 180
  • Thanks -- I already have it running with program/trunk, program/branch, ... is there a way to change it now? Also, is it possible to check out the examples into subdirectories of the program/ directory locally? Or have to write a separate script -- I'm distributing this to scientists (i.e. non-programmers) so trying to keep it simple. Thanks! – hatmatrix Dec 03 '10 at 19:27
  • You can always rearrange your repository. If you have program/trunk, program/branch, you can add program/trunk/code and program/trunk/examples, or you can put the examples at the top level if they're not version dependent (e.g., program/trunk, program/branch, program/examples). Or you could just include the examples with the code, which really seems easiest unless they're really large. – larsks Dec 03 '10 at 19:36
  • Much appreciated! – hatmatrix Dec 03 '10 at 19:53