views:

75

answers:

2

What do you recommend for using SVN as a means to manage development of a project using remote/external developers in terms of code review/managing changes,etc? Should everyone checkin to the trunk and provide comments for everything or do people use patches, branches, or some othe process to manage this? Please provide any suggestions you have for having a small team of remote developers (5) submitting work into SVN and a single individual overall responsible for the project's development who reviews code changes, etc. Thanks

+1  A: 

It depends on the specifics of the project. Is it a team assembled to complete a project and be gone, or is it an ongoing effort with versions. release schedule, etc.

We are closer to the latter. Here is our process:

  • For a new release/feature of a considerable size we create a separate branch.
  • The developers can check in the code - we push for every checkin to have a comment.
  • To stay in synch with the trunk the branch owner is responsible for merging trunk into his branch
  • When the feature/release is completed the branch is code-reviewed and merged back into trunk
  • the branch is deleted. If the work on the branch has to continue the branch has to be re-created - this due to SVN limitations

Edit

To elaborate a little:

The branches are the playground for ongoing development. Every developer (or developer lead for bigger features) is responsible for his own branch, including proper checkin procedures (checkin comments) as well as synchronzing with the trunk.

The trunk, on the other hand is a place of stability - at any moment you should be able to build a working version of the app off the trunk. As a matter of fact we have a CI process doing it automatically with every checkin.

To achieve this stability the changes are never made directly to the trunk (except for smth really small and really urgent).

The process of trunk modification is a responsibility of the internal developer. Once the owner of a branch declared it ready for production, the internal developer has to review the submitted code (from the branch) and merge it back into trunk.

After the merge back the branch becomes unusable and has to be deleted.

mfeingold
Thanks - in our case there will be ongoing versions and releases although the external team may or may not be involved after v1.0.Applying your scenario to ours - would you say then that an Internal team member could be assigned ownership of the branch and merging trunk development by external developers into the branch?
asp2go
Your edit comments are interesting - this seems almost the exact opposite of some blogs I've read suggesting that the trunk may be the location of ongoing development and branching often done for stabilization of a specific release. Not suggesting it is wrong by any means as we're still trying to figure this out - just interesting to see all the different usage styles out there.
asp2go
We still use branches and, especially tags to create 'snapshots' but this is a different set of branches
mfeingold
+2  A: 

The answer to this will depend on:

  • How much do you trust the contractors?
  • How much effort does your group want to put into managing this?

Here are some scenarios:

No Trust

  • Read only repository access
  • No access to trunk
  • Submissions are done with patches
  • Somebody on your team will manage the patches

Medium Trust

  • Read-write milestone branches
  • Contractors submit to milestone branches.
  • Somebody on your team merges into the release branch

Full Trust

  • Full access to trunk
  • Contractors in charge of merging their changes

As for best practices, I suggest the following:

  • Track milestones with burn-down chart, or the system of your choice
  • Make everybody commit with comments (could use a Subversion hook for this)
  • Align code commits to a specific item/ticket in a management system like FogBugz, OnTime, ect.
  • Large features or milestones should have their own branch. Merge to trunk one the feature/milestone has been validated by somebody on your team.

There are just some ideas. You'll have to find what's best for your mix of team members and contractors.

hectorsosajr
I do not think there is much difference between options 1 and 2. In both cases the trunk is protected and the branches are isolated. Except option 1 requires some extra work on part of the internal person.
mfeingold
Thanks - this seems like a good approach to handle the different scenarios. One thing I like about the Medium scenario is that it forces an internal team member to review the changes and be in control of the process. I guess with the ability to go back in time within the repository perhaps the benefit isn't huge - anyhow as you've suggested this may take some trial and error (hopefully not much error!).thanks
asp2go
mfeingold, yes you are correct. Managing patches is a lot easier and takes less time than managing merges. I've done both, and that's given me insight on how hard/easy these things are.
hectorsosajr