views:

39

answers:

1

Suppose i outsource my existing php project for adding more functionality to it. I don't want to provide the whole code to the outsourced developer to protect my ip and idea.

So say, using svn i create a branch for the project.

And then put the code files that will need to be modified to add new functionality in that branch.

Then how does the outsourced developer run the whole project to see the new functionality in action ( the branch files may be dependent on include files that are code files in the trunk..... also the project may run as a whole and not just as a branch)

How do you let the developer check out the functionality he implemented without giving him access to the (whole code)trunk.

PS:- I have only a limited knowledge of svn.

Is there anything better than svn for this?

+1  A: 

Please read up on branching and merging in svn so that you get a better picture of what branching can (and cannot) be used for. The whole of the subversion book is a great read if you are new to svn (and to source control in general).

If you create a branch for your project (done by copying the "trunk" to a "branches/branchName" directory), you already have a copy of all your source files in the branch (the "branches/branchName" directory). If what you have done is create a new directory and then manually copied certain files from your project into it, you're not really creating a proper branch, and it will be difficult to merge changes between them.

I'm not sure how it will be possible for the outsourced developer to run your whole application himself without access to all of your php source. What you could try to do is build a stripped-down version of your application that only exercises the component the other developer is working on.

A possible svn-based solution is to give the other developer access to only a subdirectory of your "trunk" that will contain the component he is working on. You can set up a continuous build that will automatically publish the entire project (including your locked-down code and his component code) to a web server on every check-in, allowing you both to test. Setting up permissions like this can easily be done in VisualSVN Server, but is not terribly difficult on *nix installations of svn either. To do the continuous build, CruiseControl (or its .NET and ruby variants) is a good place to start.

Stuart Lange
Yes, i've been think about something like that. Suppose main trunk dir is MYPROJ(my project) i have a sub -dir named OSD(outsourced) inside that. Let's say OSD contains files that includes other files from the main trunk. Would i need to change the includes in OSD files to include MYPROJ/file1. php or would it still work as if the the files existed in the same dir. ex. include file1.php