You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Brian FitzGerald <bm...@gmail.com> on 2009/06/29 15:38:19 UTC
SVN with code review workflow
Greetings all,
I am a Web developer with a company who (rightfully so) places a large
amount of importance on code review. For this reason, up to this
point, they have not implemented a traditional version control system,
such as Subversion.
The concern of certain key people in the organization is that putting
SVN in place would mean losing control of the code base in that
developers could simply commit whatever, whenever they wanted, without
going through the highly valued code review process.
I understand their concern, and I have a few ideas about what could be
some potential solutions to our problem, but I wanted to get thoughts
from others about ways they have seen this tackled.
One solution I have heard of large shops using is to have each
developer have their own branch in the repository, so that once their
coding is complete, they would commit to their personal branch. Then,
the code reviewer would perform a commit from the developers branch to
the (and I get hazy about the specifics here) main development branch
(would this need to be a separate repository?).
At this point, the code reviewer could look at all the diffs between
the code in the developers branch, and the code in the main
development branch, and either reject or approve and commit the code.
For updates, developers would grab from the main development
repository (or branch), so that they would always be synced up with
the changes committed (and approved) by other developers.
I have also heard of tools such as Codestriker
http://codestriker.sourceforge.net/,
which apparently integrate with SVN and may be valuable in this
process as well.
What solutions have you all seen in action? Thanks in advance for any
other thoughts on the topic.
Thanks,
Brian
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2366430
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: SVN with code review workflow
Posted by ru...@vshift.com.
I wouldn't recommend a developer's branch personally. I would have a branch per feature/change request/ticket and once that's complete, it can go to the reviewer to review and merge into trunk.
This is what we do for larger changes, with the branches corresponding to their trac ticket numbers.
Having a single developer branch would force the developer to stop working - or at least not commit his changes until the review of the previous change has been made and approved.
Russ
Sent from my Verizon Wireless BlackBerry
-----Original Message-----
From: Brian FitzGerald <bm...@gmail.com>
Date: Mon, 29 Jun 2009 11:38:19
To: <us...@subversion.tigris.org>
Subject: SVN with code review workflow
Greetings all,
I am a Web developer with a company who (rightfully so) places a large
amount of importance on code review. For this reason, up to this
point, they have not implemented a traditional version control system,
such as Subversion.
The concern of certain key people in the organization is that putting
SVN in place would mean losing control of the code base in that
developers could simply commit whatever, whenever they wanted, without
going through the highly valued code review process.
I understand their concern, and I have a few ideas about what could be
some potential solutions to our problem, but I wanted to get thoughts
from others about ways they have seen this tackled.
One solution I have heard of large shops using is to have each
developer have their own branch in the repository, so that once their
coding is complete, they would commit to their personal branch. Then,
the code reviewer would perform a commit from the developers branch to
the (and I get hazy about the specifics here) main development branch
(would this need to be a separate repository?).
At this point, the code reviewer could look at all the diffs between
the code in the developers branch, and the code in the main
development branch, and either reject or approve and commit the code.
For updates, developers would grab from the main development
repository (or branch), so that they would always be synced up with
the changes committed (and approved) by other developers.
I have also heard of tools such as Codestriker
http://codestriker.sourceforge.net/,
which apparently integrate with SVN and may be valuable in this
process as well.
What solutions have you all seen in action? Thanks in advance for any
other thoughts on the topic.
Thanks,
Brian
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2366430
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2366436
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: SVN with code review workflow
Posted by Ed <SV...@0x1b.com>.
In addition to using Subversion, you might look into the addition of
Trac - it is a very handy addition to the development environment and
has plugins for some pretty sophisticated workflow.
http://trac.edgewall.org/
On Mon, Jun 29, 2009 at 7:55 PM, Ryan
Schmidt<su...@ryandesign.com> wrote:
> On Jun 29, 2009, at 10:38, Brian FitzGerald wrote:
>
>> One solution I have heard of large shops using is to have each
>>
>> developer have their own branch in the repository, so that once their
>> coding is complete, they would commit to their personal branch. Then,
>> the code reviewer would perform a commit from the developers branch to
>> the (and I get hazy about the specifics here) main development branch
>> (would this need to be a separate repository?).
>
> My case against a branch per developer is that there's no reason why
> a developer would be working on only one task. I was usually working
> on several tasks for each project, at the last web development
> company where I worked. I didn't use separate branches, but I did use
> multiple working copies of each project's trunk. But then we didn't
> have restrictions on who could commit to trunk. Once I was done
> working on one task I could commit it and move to another one. If,
> after finishing a task, I had to send it off to someone for a lengthy
> approval process, I wouldn't want to have to sit around waiting for
> their response. I'd want to be able to work on a new task, which
> should then be in a different branch to not muck up the reviewers.
> Hence a branch per feature as already suggested.
>
>
> I also wanted to point out there's no reason why you can't continue
> to do exactly what you do now, only with Subversion. Set up a
> repository but only give commit access to your reviewers. The
> developers continue to develop and send patches or whatever to the
> reviewers, and only they would commit it, once they've reviewed it.
> I'm not saying this is a great way to set up Subversion, but it is a
> way to use it that would not differ much from what you do now, thus
> might be easier to get approved by the powers that be. Then once
> that's in place, you can start suggesting small ways the workflow can
> be changed to make it more better, e.g. showing how allowing commit
> access to non-reviewers to non-trunk areas like branches would allow
> developers to be more productive while not impacting your review
> mechanism for trunk.
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2366579
>
> To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
>
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2366631
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: SVN with code review workflow
Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jun 29, 2009, at 10:38, Brian FitzGerald wrote:
> One solution I have heard of large shops using is to have each
>
> developer have their own branch in the repository, so that once their
> coding is complete, they would commit to their personal branch. Then,
> the code reviewer would perform a commit from the developers branch to
> the (and I get hazy about the specifics here) main development branch
> (would this need to be a separate repository?).
My case against a branch per developer is that there's no reason why
a developer would be working on only one task. I was usually working
on several tasks for each project, at the last web development
company where I worked. I didn't use separate branches, but I did use
multiple working copies of each project's trunk. But then we didn't
have restrictions on who could commit to trunk. Once I was done
working on one task I could commit it and move to another one. If,
after finishing a task, I had to send it off to someone for a lengthy
approval process, I wouldn't want to have to sit around waiting for
their response. I'd want to be able to work on a new task, which
should then be in a different branch to not muck up the reviewers.
Hence a branch per feature as already suggested.
I also wanted to point out there's no reason why you can't continue
to do exactly what you do now, only with Subversion. Set up a
repository but only give commit access to your reviewers. The
developers continue to develop and send patches or whatever to the
reviewers, and only they would commit it, once they've reviewed it.
I'm not saying this is a great way to set up Subversion, but it is a
way to use it that would not differ much from what you do now, thus
might be easier to get approved by the powers that be. Then once
that's in place, you can start suggesting small ways the workflow can
be changed to make it more better, e.g. showing how allowing commit
access to non-reviewers to non-trunk areas like branches would allow
developers to be more productive while not impacting your review
mechanism for trunk.
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2366579
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: SVN with code review workflow
Posted by Carsten Koch <Ca...@web.de>.
On Mon, 2009-06-29 at 11:38 -0400, Brian FitzGerald wrote:
...
> One solution I have heard of large shops using is to have each
> developer have their own branch in the repository, so that once their
> coding is complete, they would commit to their personal branch.
> Then,
> the code reviewer would perform a commit from the developers branch
> to
> the (and I get hazy about the specifics here) main development branch
> (would this need to be a separate repository?).
We have a combination of policies,
configurations, hooks scripts and python tools
to enforce the following workflow:
Each software product we develop has its own repository
http://svn/product_name
Each repository has a main development line
http://svn/product_name/trunk
some older branches
http://svn/product_name/branches/branch_name
a collections of official builds
http://svn/product_name/builds/build_name
and a collection of modification branches
http://svn/product_name/mods/branch_name
The commit rights in the repository are restricted,
so only very few people (and robots) can commit
everywhere and all developers can commit into
http://svn/product_name/mods/
Whenever a developer starts a modification, they create
a branch which can be a copy of the head revision of
the trunk or older branch or of a specific official build.
As a convention, developer bob calls a branch that is
created to fix issue #4711
http://svn/product_name/mods/bob-issue_4711
We have a "create_mod" GUI tool that automates this.
bob now has his own private branch that will not
change unless he commits a change to it.
When bob is done with his modification, he can use
a tool to build it on all platforms and another tool
that re-merges it so it fits into the head or the
latest build.
Once bob is satisfied with his mod branch, he submits
it for code review to one to five other developers
using a "submit_mod" GUI tool.
(These tools use svn properties to keep track of the
mod state)
Once all developers have accepted the mod, a daemon
picks it up, builds it on all platforms and commits
it back into the trunk or the older branch where it
originated if the build was OK on all platforms.
We currently have about a dozen svn repositories that
are managed this way and form a hierarchy of software
products that re-use some base products (libraries)
to build end products based on them.
During the night another daemon works its way through this
hierarchy (of 30 trunks / older branches) and creates
the official builds.
Carsten.
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2366489
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: SVN with code review workflow
Posted by Brian FitzGerald <bm...@gmail.com>.
Excellent points, Hari. Thank you for your insight. That trust is
certainly key, and is something that is severely lacking at this point. I
will certainly look to put a tactful spin on the proposed changes, as you
suggested.
Thanks again for all the feedback, I should be able to put together a strong
case with the additional insight from each of you.
Kind Regards,
Brian
On Mon, Jun 29, 2009 at 2:22 PM, Hari Kodungallur <hk...@gmail.com>wrote:
>
>
> On Mon, Jun 29, 2009 at 10:20 AM, Brian FitzGerald <
> bmfitzgerald3@gmail.com> wrote:
>
>> First of all, thanks to everyone for the helpful replies.
>>
>>
>>
>>> Yes, code review is good. But I do not see the need to try to enforce
>>> it so strongly. This can be treated as a social problem.
>>
>>
>> You're absolutely right. I believe this is a social problem in our
>> organization. Those in charge treat everything with a militaristic rigidity
>> and at this point are absolutely unwilling to give up on the idea that
>> everything must be code reviewed before being (currently manually) merged
>> with the main development codebase. Adding to the pain for developers is a
>> 4 hour turnaround time and a ridiculously strict set of standards (i.e. if
>> you have an extra space in your code, it will get kicked back from review).
>> But the point is, this code review policy is the excuse for not having
>> Subversion in place. At this point I'm just trying to come up with an
>> irrefutable setup using SVN that will be more productive than what we have
>> currently.
>>
>>
>>> If you want
>>> all code to be reviewed before committing, then just make that policy.
>>> Ask people to include information about the reviewers in the commit
>>> message. Setup the post-commit hook so that all commits are sent to a
>>> mailing list that all your developers see. If you see commits come
>>> through without the review info, then ask why it is not there and
>>> whether the review happened. Developers are not going to want to make
>>> public mistakes again and again and they will get it right.
>>>
>>
>> I see, so you are suggesting that you basically get with the reviewer
>> one-on-one before the commit is made, perhaps at the desk of the developer,
>> to look at the changes, and then after everything is approved, make the
>> commit. Unfortunately, at this point, I think the social aspect is at a
>> point where those in charge will not "allow" the code-reviewers to meet at
>> the developers desk to look over the code, and instead the reviewer must
>> review the code independently at his own workstation, then return the
>> results to the developer. At which point, changes are made, and
>> resubmitted, and the 4 hour clock starts ticking again.
>>
>>>
>>> If you really want some enforcement, a pre-commit hook could reject
>>> any commit that does not contain the "Reviewed by:" section of the
>>> message. But surely there are some commits, such as typos etc. that
>>> can be committed without review.
>>>
>>
>> This is a great idea and one I will bring up when I go to fight the good
>> fight. Sadly, at this time, not even typos can sneak by the 4 hour review
>> turnaround.
>>
>>>
>>>
>>> > I understand their concern, and I have a few ideas about what could be
>>> > some potential solutions to our problem, but I wanted to get thoughts
>>> > from others about ways they have seen this tackled.
>>> >
>>> > One solution I have heard of large shops using is to have each
>>> > developer have their own branch in the repository, so that once their
>>> > coding is complete, they would commit to their personal branch. Then,
>>> > the code reviewer would perform a commit from the developers branch to
>>> > the (and I get hazy about the specifics here) main development branch
>>> > (would this need to be a separate repository?).
>>> >
>>> > At this point, the code reviewer could look at all the diffs between
>>> > the code in the developers branch, and the code in the main
>>> > development branch, and either reject or approve and commit the code.
>>> > For updates, developers would grab from the main development
>>> > repository (or branch), so that they would always be synced up with
>>> > the changes committed (and approved) by other developers.
>>>
>>> There is no question this works, but it is a very heavy process to put
>>> in place just for code review. If that is your only motivation, there
>>> are better ways, IMO, such as handling it as mentioned above.
>>>
>>
>> Understood. But compared to what we have now it sounds like a weight of
>> developers' shoulders already. Russ suggested earlier different branches
>> based on features / tickets, etc., but with the amount of projects we have
>> running through here, I think they would argue that this would get far too
>> cumbersome very quickly (not that I agree, just looking to prepare myself
>> here). Also, others have suggested setting up a branch before a launch and
>> taking care of everything there before commit. The thing is, here, we do
>> sort of a piecemeal deployment, each small project at a time, so bundling
>> everything together into a new branch for "Version 1.6" or something would
>> be shot down I'm sure. I'm thinking continuous integration is the solution
>> to this, but first thing first and I'm just trying to get Subversion in
>> place as priority number one.
>>
>> Also, Les made a comment: "Just because someone commits a change to the
>> trunk doesn't mean you have to use it in production." What you say is true,
>> of course, but is there a good way to keep track of what should and
>> shouldn't be part of a deployment when there are production ready and non
>> production changes being committed to the same trunk? Or are you just
>> suggesting that another committ can follow right behind to clean it up?
>>
>> What I'm getting at is, right now we manually (with an inhouse tool) keep
>> track of what should and shouldn't be deployed by means of creating a
>> "depoyment script" which says, ok, methodA, methodB, methodC, and viewA,
>> viewB, viewC, and imageA, should be part of this deployment, and nothing
>> else. I think the other argument I will get is "Using Subversion, with all
>> the projects we have going on simultaneously, how are we going to keep track
>> of what items should be part of each deployment?"
>>
>>
>> > I have also heard of tools such as Codestriker
>> > http://codestriker.sourceforge.net/,
>> >
>> > which apparently integrate with SVN and may be valuable in this
>> > process as well.
>> >
>> > What solutions have you all seen in action? Thanks in advance for any
>> > other thoughts on the topic.
>>
>> I've used Review Board
>>> http://www.review-board.org/
>>>
>>> It is nice and works well with SVN. I think the best approach is the
>>> way open-source projects like SVN handle it. Developers use svn diff
>>> to create a patch with their changes and mail it, along with the
>>> commit message to a mailing list. Developers can apply the patch and
>>> reply to the email for the review.
>>
>>
>> I'm not sure I follow here. They mail and later apply the patch? What do
>> you mean by this?
>>
>>
>>> When you commit your changes, you
>>> note in the commit message who reviewed it. In addition, all commits
>>> are also sent to a mailing list. This allows developers to do
>>> post-commit reviews when they notice something that does not look
>>> right. After all, they may not have been the developer asked to do
>>> the original review, so this is the first time they saw it.
>>> Post-commit reviews can be just as effective as pre-commit, but you
>>> need a team that is committed to doing them.
>>
>>
>> Another great idea, thank you.
>>
>>
>>>
>>>
>>> Finally, in open-source world if committers do not follow the project
>>> standards you use social pressures to get them to comply and if that
>>> fails you simply revoke the commit privs. This works in corporate
>>> settings too. If a developer cannot commit, they will have to send
>>> all their patches to someone else to review and commit. They'll
>>> learn.
>>>
>>
>> Very true. Thanks to everyone for their thoughts, you guys have given me
>> some good fuel.
>>
>>
>
> I agree with almost all the responses. Let me, however, add one more thing.
> One can only take the process so far with the addition of svn and any other
> workflow. It will really start working for you only when whoever is 'in
> control' starts to trust the developers and also the people who take care of
> the process. Perhaps you want to demo it in such a way that this new process
> was always 'their' idea :-)
> At my first work place in the US, my manager had told me (paraphrasing):
> "In the US, business runs on trust. Watchign CNBC, you might think that the
> only thing that matters is the 'bottom-line'. While that is mosty true, the
> businesses that run well achieve the 'bottom-line' by trusting the
> employees". I have not yet seen an instance where that statement was proven
> wrong.
>
> thanks,
> -Hari
>
>
>
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2366493
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: SVN with code review workflow
Posted by Hari Kodungallur <hk...@gmail.com>.
On Mon, Jun 29, 2009 at 10:20 AM, Brian FitzGerald
<bm...@gmail.com>wrote:
> First of all, thanks to everyone for the helpful replies.
>
>
>
>> Yes, code review is good. But I do not see the need to try to enforce
>> it so strongly. This can be treated as a social problem.
>
>
> You're absolutely right. I believe this is a social problem in our
> organization. Those in charge treat everything with a militaristic rigidity
> and at this point are absolutely unwilling to give up on the idea that
> everything must be code reviewed before being (currently manually) merged
> with the main development codebase. Adding to the pain for developers is a
> 4 hour turnaround time and a ridiculously strict set of standards (i.e. if
> you have an extra space in your code, it will get kicked back from review).
> But the point is, this code review policy is the excuse for not having
> Subversion in place. At this point I'm just trying to come up with an
> irrefutable setup using SVN that will be more productive than what we have
> currently.
>
>
>> If you want
>> all code to be reviewed before committing, then just make that policy.
>> Ask people to include information about the reviewers in the commit
>> message. Setup the post-commit hook so that all commits are sent to a
>> mailing list that all your developers see. If you see commits come
>> through without the review info, then ask why it is not there and
>> whether the review happened. Developers are not going to want to make
>> public mistakes again and again and they will get it right.
>>
>
> I see, so you are suggesting that you basically get with the reviewer
> one-on-one before the commit is made, perhaps at the desk of the developer,
> to look at the changes, and then after everything is approved, make the
> commit. Unfortunately, at this point, I think the social aspect is at a
> point where those in charge will not "allow" the code-reviewers to meet at
> the developers desk to look over the code, and instead the reviewer must
> review the code independently at his own workstation, then return the
> results to the developer. At which point, changes are made, and
> resubmitted, and the 4 hour clock starts ticking again.
>
>>
>> If you really want some enforcement, a pre-commit hook could reject
>> any commit that does not contain the "Reviewed by:" section of the
>> message. But surely there are some commits, such as typos etc. that
>> can be committed without review.
>>
>
> This is a great idea and one I will bring up when I go to fight the good
> fight. Sadly, at this time, not even typos can sneak by the 4 hour review
> turnaround.
>
>>
>>
>> > I understand their concern, and I have a few ideas about what could be
>> > some potential solutions to our problem, but I wanted to get thoughts
>> > from others about ways they have seen this tackled.
>> >
>> > One solution I have heard of large shops using is to have each
>> > developer have their own branch in the repository, so that once their
>> > coding is complete, they would commit to their personal branch. Then,
>> > the code reviewer would perform a commit from the developers branch to
>> > the (and I get hazy about the specifics here) main development branch
>> > (would this need to be a separate repository?).
>> >
>> > At this point, the code reviewer could look at all the diffs between
>> > the code in the developers branch, and the code in the main
>> > development branch, and either reject or approve and commit the code.
>> > For updates, developers would grab from the main development
>> > repository (or branch), so that they would always be synced up with
>> > the changes committed (and approved) by other developers.
>>
>> There is no question this works, but it is a very heavy process to put
>> in place just for code review. If that is your only motivation, there
>> are better ways, IMO, such as handling it as mentioned above.
>>
>
> Understood. But compared to what we have now it sounds like a weight of
> developers' shoulders already. Russ suggested earlier different branches
> based on features / tickets, etc., but with the amount of projects we have
> running through here, I think they would argue that this would get far too
> cumbersome very quickly (not that I agree, just looking to prepare myself
> here). Also, others have suggested setting up a branch before a launch and
> taking care of everything there before commit. The thing is, here, we do
> sort of a piecemeal deployment, each small project at a time, so bundling
> everything together into a new branch for "Version 1.6" or something would
> be shot down I'm sure. I'm thinking continuous integration is the solution
> to this, but first thing first and I'm just trying to get Subversion in
> place as priority number one.
>
> Also, Les made a comment: "Just because someone commits a change to the
> trunk doesn't mean you have to use it in production." What you say is true,
> of course, but is there a good way to keep track of what should and
> shouldn't be part of a deployment when there are production ready and non
> production changes being committed to the same trunk? Or are you just
> suggesting that another committ can follow right behind to clean it up?
>
> What I'm getting at is, right now we manually (with an inhouse tool) keep
> track of what should and shouldn't be deployed by means of creating a
> "depoyment script" which says, ok, methodA, methodB, methodC, and viewA,
> viewB, viewC, and imageA, should be part of this deployment, and nothing
> else. I think the other argument I will get is "Using Subversion, with all
> the projects we have going on simultaneously, how are we going to keep track
> of what items should be part of each deployment?"
>
>
> > I have also heard of tools such as Codestriker
> > http://codestriker.sourceforge.net/,
> >
> > which apparently integrate with SVN and may be valuable in this
> > process as well.
> >
> > What solutions have you all seen in action? Thanks in advance for any
> > other thoughts on the topic.
>
> I've used Review Board
>> http://www.review-board.org/
>>
>> It is nice and works well with SVN. I think the best approach is the
>> way open-source projects like SVN handle it. Developers use svn diff
>> to create a patch with their changes and mail it, along with the
>> commit message to a mailing list. Developers can apply the patch and
>> reply to the email for the review.
>
>
> I'm not sure I follow here. They mail and later apply the patch? What do
> you mean by this?
>
>
>> When you commit your changes, you
>> note in the commit message who reviewed it. In addition, all commits
>> are also sent to a mailing list. This allows developers to do
>> post-commit reviews when they notice something that does not look
>> right. After all, they may not have been the developer asked to do
>> the original review, so this is the first time they saw it.
>> Post-commit reviews can be just as effective as pre-commit, but you
>> need a team that is committed to doing them.
>
>
> Another great idea, thank you.
>
>
>>
>>
>> Finally, in open-source world if committers do not follow the project
>> standards you use social pressures to get them to comply and if that
>> fails you simply revoke the commit privs. This works in corporate
>> settings too. If a developer cannot commit, they will have to send
>> all their patches to someone else to review and commit. They'll
>> learn.
>>
>
> Very true. Thanks to everyone for their thoughts, you guys have given me
> some good fuel.
>
>
I agree with almost all the responses. Let me, however, add one more thing.
One can only take the process so far with the addition of svn and any other
workflow. It will really start working for you only when whoever is 'in
control' starts to trust the developers and also the people who take care of
the process. Perhaps you want to demo it in such a way that this new process
was always 'their' idea :-)
At my first work place in the US, my manager had told me (paraphrasing): "In
the US, business runs on trust. Watchign CNBC, you might think that the only
thing that matters is the 'bottom-line'. While that is mosty true, the
businesses that run well achieve the 'bottom-line' by trusting the
employees". I have not yet seen an instance where that statement was proven
wrong.
thanks,
-Hari
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2366490
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: SVN with code review workflow
Posted by BRM <bm...@yahoo.com>.
Reading over some of this I think there is a big point that needs to be made - what is it that the review process cares about? and what is it that a version control system cares about?
The two are not fully mutually exclusive, but not fully mutually inclusive either.
Your review process cares about the change that is being made to the product.
The version control system, however, cares about every little step made to make that change.
So think about it this way:
You have your product in the repository (say http://svn/product_name, so use another example) with its own trunk (e.g. http://svn/product_name/trunk).
To allow your developers to work, you make a copy (aka branch) of the product (e.g. http://svn/product_name/branches/developer/change-A) - it doesn't matter whether this branch is a 'feature' branch or a developer branch; the only thing that matters it that it is going to capture the changes made for 'change-A' - it might be for a bug request, feature enhancement, or general development.
The key to remember is that the developer makes many changes in the process of making that change that will be reviewed. They might create add 200 lines of code, modify 400 lines of code, and then delete 300 lines of code. The question comes - how, then, do you track it? Your review process doesn't really care that 200 lines were added, 400 lines were modified, and 300 lines removed; it really only cares about the net changes - 100 lines of code removed and 400 lines modified. However, the developer may very well care about how they went about those changes, and adding version control will give them the ability to manage those changes. Further, having a single version control system will allow the company to backup their work between the changes.
Okay - time for an example. One job I worked at did not have any version control in place. (No reviews either.) The original developer would make his changes to the code base and when he was satisfied copy the directory as a marker. Management didn't care that there was no version control system either. (sadly) So when I started, they wanted me to do the same. After a little work, I installed TSVN on my system, and checked in everything to a local repository on my laptop, and then exported to make the copies they wanted. This gave me the ability to version my changes - and track what I did - in an easy to use manner with full version control, but outside of management. If anything happened to my laptop, then all changes were lost - the whole history was lost. I later convinced them to give me a system to host SVN on, and converted my local repository into a hosted repository where others could gain access and we could do daily and monthly backups.
Fact is, your developers that care about version control are going to have a version control system installed on their own development systems - whether it is SVN, CVS, git, or whatever else they can get their hands on. As an organization, you will not be able to capture those changes in the history, nor make backups. Developers do care about all changes as they'll be able to undo things in their working copy a lot easier with version control than without when they find that a change did not work. Version control - any version control - makes this far easier, and I'd probably argue SVN makes it among the easiest. (There's probably a good sized group that would argue that git makes it easier yet - I don't know - haven't used it; but that's a different topic altogether.)
So the organization is faced with the question: What is it that we care about? Capturing the history of changes to the product and every step of the way? Or capturing only the major changes? Backuping up the developers work and aiding them in the development process? Or making the development process a non-trivial task?
A smart manager will recognize that version control is an aid to help the developer AND the organization, and the permissions and layout of the repository aid the process the organization wants to use.
So, based on what I've read in this conversionation, you'd probably have a great mix by doing a 'trunk' for each 'product' (however granular you want to make it) and then splitting off a branch for each developer to use for a given development task. The developer can then track their own changes throughout their development process, and when they're done it can be turned over for review and integration back into the trunk. The review process would have previously only seen the change set comprising the beginning (r0) and end (rN) of the branch; now you will also get to see r1 to r(N-1) as well in the history. Further, if the developer needs a change from trunk to complete their branch, then they can reintegrate trunk into their branch as well (if they had read permissions to trunk). This can all be managed by permissions - only reviewers get read/write permissions to trunk; everyone else gets at best read-only or even no permissions. (If a developer
has no permissions, then they won't be able to even see the contents of trunk.) Developers would have read/write permissions to the specific branch they are working on/under - it might get a bit tedious to always be granting/denying permissions, so it might be wise to give the developer a general workspace to which their branches are placed under for work.
Further, permissions would also allow you to assign a group of developers to work on a single task - and they could branch/integrate between themselves as well if the repository supported it.
So in the end, version control gives you tracking of all changes, you can still have your review process, and you can get a more collaborative development environment that is also more developer friendly in the process with a code-base that has its full history and can be backed up as desired by the organization.
HTH,
Ben
________________________________
From: Brian FitzGerald <bm...@gmail.com>
To: Mark Phippard <ma...@gmail.com>
Cc: users@subversion.tigris.org
Sent: Monday, June 29, 2009 1:20:49 PM
Subject: Re: SVN with code review workflow
First of all, thanks to everyone for the helpful replies.
>Yes, code review is good. But I do not see the need to try to enforce
>>it so strongly. This can be treated as a social problem.
You're absolutely right. I believe this is a social problem in our organization. Those in charge treat everything with a militaristic rigidity and at this point are absolutely unwilling to give up on the idea that everything must be code reviewed before being (currently manually) merged with the main development codebase. Adding to the pain for developers is a 4 hour turnaround time and a ridiculously strict set of standards (i.e. if you have an extra space in your code, it will get kicked back from review). But the point is, this code review policy is the excuse for not having Subversion in place. At this point I'm just trying to come up with an irrefutable setup using SVN that will be more productive than what we have currently.
If you want
>>all code to be reviewed before committing, then just make that policy.
>> Ask people to include information about the reviewers in the commit
>>message. Setup the post-commit hook so that all commits are sent to a
>>mailing list that all your developers see. If you see commits come
>>through without the review info, then ask why it is not there and
>>whether the review happened. Developers are not going to want to make
>>public mistakes again and again and they will get it right.
>
I see, so you are suggesting that you basically get with the reviewer one-on-one before the commit is made, perhaps at the desk of the developer, to look at the changes, and then after everything is approved, make the commit. Unfortunately, at this point, I think the social aspect is at a point where those in charge will not "allow" the code-reviewers to meet at the developers desk to look over the code, and instead the reviewer must review the code independently at his own workstation, then return the results to the developer. At which point, changes are made, and resubmitted, and the 4 hour clock starts ticking again.
>>If you really want some enforcement, a pre-commit hook could reject
>>any commit that does not contain the "Reviewed by:" section of the
>>message. But surely there are some commits, such as typos etc. that
>>can be committed without review.
>
This is a great idea and one I will bring up when I go to fight the good fight. Sadly, at this time, not even typos can sneak by the 4 hour review turnaround.
>
>>> I understand their concern, and I have a few ideas about what could be
>>> some potential solutions to our problem, but I wanted to get thoughts
>>> from others about ways they have seen this tackled.
>>>
>>> One solution I have heard of large shops using is to have each
>>> developer have their own branch in the repository, so that once their
>>> coding is complete, they would commit to their personal branch. Then,
>>> the code reviewer would perform a commit from the developers branch to
>>> the (and I get hazy about the specifics here) main development branch
>>> (would this need to be a separate repository?).
>>>
>>> At this point, the code reviewer could look at all the diffs between
>>> the code in the developers branch, and the code in the main
>>> development branch, and either reject or approve and commit the code.
>>> For updates, developers would grab from the main development
>>> repository (or branch), so that they would always be synced up with
>>> the changes committed (and approved) by other developers.
>
>There is no question this works, but it is a very heavy process to put
>>in place just for code review. If that is your only motivation, there
>>are better ways, IMO, such as handling it as mentioned above.
>
Understood. But compared to what we have now it sounds like a weight of developers' shoulders already. Russ suggested earlier different branches based on features / tickets, etc., but with the amount of projects we have running through here, I think they would argue that this would get far too cumbersome very quickly (not that I agree, just looking to prepare myself here). Also, others have suggested setting up a branch before a launch and taking care of everything there before commit. The thing is, here, we do sort of a piecemeal deployment, each small project at a time, so bundling everything together into a new branch for "Version 1.6" or something would be shot down I'm sure. I'm thinking continuous integration is the solution to this, but first thing first and I'm just trying to get Subversion in place as priority number one.
Also, Les made a comment: "Just because someone commits a change to the trunk doesn't mean you have to use it in production." What you say is true, of course, but is there a good way to keep track of what should and shouldn't be part of a deployment when there are production ready and non production changes being committed to the same trunk? Or are you just suggesting that another committ can follow right behind to clean it up?
What I'm getting at is, right now we manually (with an inhouse tool) keep track of what should and shouldn't be deployed by means of creating a "depoyment script" which says, ok, methodA, methodB, methodC, and viewA, viewB, viewC, and imageA, should be part of this deployment, and nothing else. I think the other argument I will get is "Using Subversion, with all the projects we have going on simultaneously, how are we going to keep track of what items should be part of each deployment?"
> I have also heard of tools such as Codestriker
> http://codestriker.sourceforge.net/,
>
> which apparently integrate with SVN and may be valuable in this
> process as well.
>
> What solutions have you all seen in action? Thanks in advance for any
> other thoughts on the topic.
I've used Review Board
>http://www.review-board.org/
>
>>It is nice and works well with SVN. I think the best approach is the
>>way open-source projects like SVN handle it. Developers use svn diff
>>to create a patch with their changes and mail it, along with the
>>commit message to a mailing list. Developers can apply the patch and
>>reply to the email for the review.
I'm not sure I follow here. They mail and later apply the patch? What do you mean by this?
>When you commit your changes, you
>>note in the commit message who reviewed it. In addition, all commits
>>are also sent to a mailing list. This allows developers to do
>>post-commit reviews when they notice something that does not look
>>right. After all, they may not have been the developer asked to do
>>the original review, so this is the first time they saw it.
>>Post-commit reviews can be just as effective as pre-commit, but you
>>need a team that is committed to doing them.
Another great idea, thank you.
>
>>Finally, in open-source world if committers do not follow the project
>>standards you use social pressures to get them to comply and if that
>>fails you simply revoke the commit privs. This works in corporate
>>settings too. If a developer cannot commit, they will have to send
>>all their patches to someone else to review and commit. They'll
>>learn.
>
Very true. Thanks to everyone for their thoughts, you guys have given me some good fuel.
Best,
Brian
>>--
>>Thanks
>
>>Mark Phippard
>http://markphip.blogspot.com/
>
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2366702
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: SVN with code review workflow
Posted by Stefan Sperling <st...@elego.de>.
On Mon, Jun 29, 2009 at 12:06:05PM -0600, Dorosky, Christopher G wrote:
> Please unsubscribe.
To unsubscribe from this discussion, e-mail:
+[users-unsubscribe@subversion.tigris.org].
RE: SVN with code review workflow
Posted by "Dorosky, Christopher G" <ch...@lmco.com>.
Please unsubscribe.
________________________________________
From: Mark Phippard [markphip@gmail.com]
Sent: Monday, June 29, 2009 12:31 PM
To: Brian FitzGerald
Cc: users@subversion.tigris.org
Subject: Re: SVN with code review workflow
On Mon, Jun 29, 2009 at 1:20 PM, Brian
FitzGerald<bm...@gmail.com> wrote:
>> It is nice and works well with SVN. I think the best approach is the
>> way open-source projects like SVN handle it. Developers use svn diff
>> to create a patch with their changes and mail it, along with the
>> commit message to a mailing list. Developers can apply the patch and
>> reply to the email for the review.
>
> I'm not sure I follow here. They mail and later apply the patch? What do
> you mean by this?
You earlier suggested developers would physically get together and
review work. Coming from an open-source world, I just naturally
assume development is distributed and developers cannot physically get
together. This is pretty common practice in enterprise world these
days too where at least teams are distributed from each other.
Anyway, in the distributed world you cannot get together. So you
either post your patches to a tool like Review Board, or you email
them to a mailing list. The person that reviews the patch can do it
by just looking at the patch, or applying the patch to their own
working copy so that they can see the code in context and build and
run it etc.
Usually the review comments are either entered into the tool (such as
Review Board) or in emails.
A good example of this just happened today on SVN mailing list. See
this thread:
http://svn.haxx.se/dev/archive-2009-06/0560.shtml
An SVN committer asked for review before committing a patch. A couple
other committers replied with review comments. The original request
came from developer in India, so he probably went offline before
seeing the review and has not committed yet, but likely will tomorrow.
He received review from two committers in Europe, one of whom, upon
being prompted to look at this code, has committed four other minor
unrelated improvements to the code today. See:
http://svn.collab.net/viewvc/svn/trunk/subversion/svnsync/main.c?view=log
--
Thanks
Mark Phippard
http://markphip.blogspot.com/
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2366478
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2366486
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: SVN with code review workflow
Posted by Mark Phippard <ma...@gmail.com>.
On Mon, Jun 29, 2009 at 1:20 PM, Brian
FitzGerald<bm...@gmail.com> wrote:
>> It is nice and works well with SVN. I think the best approach is the
>> way open-source projects like SVN handle it. Developers use svn diff
>> to create a patch with their changes and mail it, along with the
>> commit message to a mailing list. Developers can apply the patch and
>> reply to the email for the review.
>
> I'm not sure I follow here. They mail and later apply the patch? What do
> you mean by this?
You earlier suggested developers would physically get together and
review work. Coming from an open-source world, I just naturally
assume development is distributed and developers cannot physically get
together. This is pretty common practice in enterprise world these
days too where at least teams are distributed from each other.
Anyway, in the distributed world you cannot get together. So you
either post your patches to a tool like Review Board, or you email
them to a mailing list. The person that reviews the patch can do it
by just looking at the patch, or applying the patch to their own
working copy so that they can see the code in context and build and
run it etc.
Usually the review comments are either entered into the tool (such as
Review Board) or in emails.
A good example of this just happened today on SVN mailing list. See
this thread:
http://svn.haxx.se/dev/archive-2009-06/0560.shtml
An SVN committer asked for review before committing a patch. A couple
other committers replied with review comments. The original request
came from developer in India, so he probably went offline before
seeing the review and has not committed yet, but likely will tomorrow.
He received review from two committers in Europe, one of whom, upon
being prompted to look at this code, has committed four other minor
unrelated improvements to the code today. See:
http://svn.collab.net/viewvc/svn/trunk/subversion/svnsync/main.c?view=log
--
Thanks
Mark Phippard
http://markphip.blogspot.com/
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2366478
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: SVN with code review workflow
Posted by Brian FitzGerald <bm...@gmail.com>.
First of all, thanks to everyone for the helpful replies.
> Yes, code review is good. But I do not see the need to try to enforce
> it so strongly. This can be treated as a social problem.
You're absolutely right. I believe this is a social problem in our
organization. Those in charge treat everything with a militaristic rigidity
and at this point are absolutely unwilling to give up on the idea that
everything must be code reviewed before being (currently manually) merged
with the main development codebase. Adding to the pain for developers is a
4 hour turnaround time and a ridiculously strict set of standards (i.e. if
you have an extra space in your code, it will get kicked back from review).
But the point is, this code review policy is the excuse for not having
Subversion in place. At this point I'm just trying to come up with an
irrefutable setup using SVN that will be more productive than what we have
currently.
> If you want
> all code to be reviewed before committing, then just make that policy.
> Ask people to include information about the reviewers in the commit
> message. Setup the post-commit hook so that all commits are sent to a
> mailing list that all your developers see. If you see commits come
> through without the review info, then ask why it is not there and
> whether the review happened. Developers are not going to want to make
> public mistakes again and again and they will get it right.
>
I see, so you are suggesting that you basically get with the reviewer
one-on-one before the commit is made, perhaps at the desk of the developer,
to look at the changes, and then after everything is approved, make the
commit. Unfortunately, at this point, I think the social aspect is at a
point where those in charge will not "allow" the code-reviewers to meet at
the developers desk to look over the code, and instead the reviewer must
review the code independently at his own workstation, then return the
results to the developer. At which point, changes are made, and
resubmitted, and the 4 hour clock starts ticking again.
>
> If you really want some enforcement, a pre-commit hook could reject
> any commit that does not contain the "Reviewed by:" section of the
> message. But surely there are some commits, such as typos etc. that
> can be committed without review.
>
This is a great idea and one I will bring up when I go to fight the good
fight. Sadly, at this time, not even typos can sneak by the 4 hour review
turnaround.
>
>
> > I understand their concern, and I have a few ideas about what could be
> > some potential solutions to our problem, but I wanted to get thoughts
> > from others about ways they have seen this tackled.
> >
> > One solution I have heard of large shops using is to have each
> > developer have their own branch in the repository, so that once their
> > coding is complete, they would commit to their personal branch. Then,
> > the code reviewer would perform a commit from the developers branch to
> > the (and I get hazy about the specifics here) main development branch
> > (would this need to be a separate repository?).
> >
> > At this point, the code reviewer could look at all the diffs between
> > the code in the developers branch, and the code in the main
> > development branch, and either reject or approve and commit the code.
> > For updates, developers would grab from the main development
> > repository (or branch), so that they would always be synced up with
> > the changes committed (and approved) by other developers.
>
> There is no question this works, but it is a very heavy process to put
> in place just for code review. If that is your only motivation, there
> are better ways, IMO, such as handling it as mentioned above.
>
Understood. But compared to what we have now it sounds like a weight of
developers' shoulders already. Russ suggested earlier different branches
based on features / tickets, etc., but with the amount of projects we have
running through here, I think they would argue that this would get far too
cumbersome very quickly (not that I agree, just looking to prepare myself
here). Also, others have suggested setting up a branch before a launch and
taking care of everything there before commit. The thing is, here, we do
sort of a piecemeal deployment, each small project at a time, so bundling
everything together into a new branch for "Version 1.6" or something would
be shot down I'm sure. I'm thinking continuous integration is the solution
to this, but first thing first and I'm just trying to get Subversion in
place as priority number one.
Also, Les made a comment: "Just because someone commits a change to the
trunk doesn't mean you have to use it in production." What you say is true,
of course, but is there a good way to keep track of what should and
shouldn't be part of a deployment when there are production ready and non
production changes being committed to the same trunk? Or are you just
suggesting that another committ can follow right behind to clean it up?
What I'm getting at is, right now we manually (with an inhouse tool) keep
track of what should and shouldn't be deployed by means of creating a
"depoyment script" which says, ok, methodA, methodB, methodC, and viewA,
viewB, viewC, and imageA, should be part of this deployment, and nothing
else. I think the other argument I will get is "Using Subversion, with all
the projects we have going on simultaneously, how are we going to keep track
of what items should be part of each deployment?"
> I have also heard of tools such as Codestriker
> http://codestriker.sourceforge.net/,
>
> which apparently integrate with SVN and may be valuable in this
> process as well.
>
> What solutions have you all seen in action? Thanks in advance for any
> other thoughts on the topic.
I've used Review Board
> http://www.review-board.org/
>
> It is nice and works well with SVN. I think the best approach is the
> way open-source projects like SVN handle it. Developers use svn diff
> to create a patch with their changes and mail it, along with the
> commit message to a mailing list. Developers can apply the patch and
> reply to the email for the review.
I'm not sure I follow here. They mail and later apply the patch? What do
you mean by this?
> When you commit your changes, you
> note in the commit message who reviewed it. In addition, all commits
> are also sent to a mailing list. This allows developers to do
> post-commit reviews when they notice something that does not look
> right. After all, they may not have been the developer asked to do
> the original review, so this is the first time they saw it.
> Post-commit reviews can be just as effective as pre-commit, but you
> need a team that is committed to doing them.
Another great idea, thank you.
>
>
> Finally, in open-source world if committers do not follow the project
> standards you use social pressures to get them to comply and if that
> fails you simply revoke the commit privs. This works in corporate
> settings too. If a developer cannot commit, they will have to send
> all their patches to someone else to review and commit. They'll
> learn.
>
Very true. Thanks to everyone for their thoughts, you guys have given me
some good fuel.
Best,
Brian
>
> --
> Thanks
>
> Mark Phippard
> http://markphip.blogspot.com/
>
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2366468
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
RE: SVN with code review workflow
Posted by Jason Malinowski <ja...@jason-m.com>.
The important thing to realize is that policies do not make good code. A good culture that encourages good code makes good code. Two companies I have worked for (market caps of over $5B each) simply had a culture that you'd e-mail diffs to the team before you hit commit. It wasn't even an official rule: in your first week you'd just see people doing it, and so you did it too. There was a mutual understanding of "we're in this together, and so we'll work as a team." As a result, the code quality was quite good, and the system was never abused.
Jason Malinowski
-----Original Message-----
From: Mark Phippard [mailto:markphip@gmail.com]
Sent: Monday, June 29, 2009 11:35 AM
To: Brian FitzGerald
Cc: users@subversion.tigris.org
Subject: Re: SVN with code review workflow
On Mon, Jun 29, 2009 at 11:38 AM, Brian
FitzGerald<bm...@gmail.com> wrote:
> Greetings all,
>
> I am a Web developer with a company who (rightfully so) places a large
> amount of importance on code review. For this reason, up to this
> point, they have not implemented a traditional version control system,
> such as Subversion.
>
> The concern of certain key people in the organization is that putting
> SVN in place would mean losing control of the code base in that
> developers could simply commit whatever, whenever they wanted, without
> going through the highly valued code review process.
Yes, code review is good. But I do not see the need to try to enforce
it so strongly. This can be treated as a social problem. If you want
all code to be reviewed before committing, then just make that policy.
Ask people to include information about the reviewers in the commit
message. Setup the post-commit hook so that all commits are sent to a
mailing list that all your developers see. If you see commits come
through without the review info, then ask why it is not there and
whether the review happened. Developers are not going to want to make
public mistakes again and again and they will get it right.
If you really want some enforcement, a pre-commit hook could reject
any commit that does not contain the "Reviewed by:" section of the
message. But surely there are some commits, such as typos etc. that
can be committed without review.
> I understand their concern, and I have a few ideas about what could be
> some potential solutions to our problem, but I wanted to get thoughts
> from others about ways they have seen this tackled.
>
> One solution I have heard of large shops using is to have each
> developer have their own branch in the repository, so that once their
> coding is complete, they would commit to their personal branch. Then,
> the code reviewer would perform a commit from the developers branch to
> the (and I get hazy about the specifics here) main development branch
> (would this need to be a separate repository?).
>
> At this point, the code reviewer could look at all the diffs between
> the code in the developers branch, and the code in the main
> development branch, and either reject or approve and commit the code.
> For updates, developers would grab from the main development
> repository (or branch), so that they would always be synced up with
> the changes committed (and approved) by other developers.
There is no question this works, but it is a very heavy process to put
in place just for code review. If that is your only motivation, there
are better ways, IMO, such as handling it as mentioned above.
> I have also heard of tools such as Codestriker
> http://codestriker.sourceforge.net/,
>
> which apparently integrate with SVN and may be valuable in this
> process as well.
>
> What solutions have you all seen in action? Thanks in advance for any
> other thoughts on the topic.
I've used Review Board
http://www.review-board.org/
It is nice and works well with SVN. I think the best approach is the
way open-source projects like SVN handle it. Developers use svn diff
to create a patch with their changes and mail it, along with the
commit message to a mailing list. Developers can apply the patch and
reply to the email for the review. When you commit your changes, you
note in the commit message who reviewed it. In addition, all commits
are also sent to a mailing list. This allows developers to do
post-commit reviews when they notice something that does not look
right. After all, they may not have been the developer asked to do
the original review, so this is the first time they saw it.
Post-commit reviews can be just as effective as pre-commit, but you
need a team that is committed to doing them.
Finally, in open-source world if committers do not follow the project
standards you use social pressures to get them to comply and if that
fails you simply revoke the commit privs. This works in corporate
settings too. If a developer cannot commit, they will have to send
all their patches to someone else to review and commit. They'll
learn.
--
Thanks
Mark Phippard
http://markphip.blogspot.com/
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2366451
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2366457
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: SVN with code review workflow
Posted by Mark Phippard <ma...@gmail.com>.
On Mon, Jun 29, 2009 at 11:38 AM, Brian
FitzGerald<bm...@gmail.com> wrote:
> Greetings all,
>
> I am a Web developer with a company who (rightfully so) places a large
> amount of importance on code review. For this reason, up to this
> point, they have not implemented a traditional version control system,
> such as Subversion.
>
> The concern of certain key people in the organization is that putting
> SVN in place would mean losing control of the code base in that
> developers could simply commit whatever, whenever they wanted, without
> going through the highly valued code review process.
Yes, code review is good. But I do not see the need to try to enforce
it so strongly. This can be treated as a social problem. If you want
all code to be reviewed before committing, then just make that policy.
Ask people to include information about the reviewers in the commit
message. Setup the post-commit hook so that all commits are sent to a
mailing list that all your developers see. If you see commits come
through without the review info, then ask why it is not there and
whether the review happened. Developers are not going to want to make
public mistakes again and again and they will get it right.
If you really want some enforcement, a pre-commit hook could reject
any commit that does not contain the "Reviewed by:" section of the
message. But surely there are some commits, such as typos etc. that
can be committed without review.
> I understand their concern, and I have a few ideas about what could be
> some potential solutions to our problem, but I wanted to get thoughts
> from others about ways they have seen this tackled.
>
> One solution I have heard of large shops using is to have each
> developer have their own branch in the repository, so that once their
> coding is complete, they would commit to their personal branch. Then,
> the code reviewer would perform a commit from the developers branch to
> the (and I get hazy about the specifics here) main development branch
> (would this need to be a separate repository?).
>
> At this point, the code reviewer could look at all the diffs between
> the code in the developers branch, and the code in the main
> development branch, and either reject or approve and commit the code.
> For updates, developers would grab from the main development
> repository (or branch), so that they would always be synced up with
> the changes committed (and approved) by other developers.
There is no question this works, but it is a very heavy process to put
in place just for code review. If that is your only motivation, there
are better ways, IMO, such as handling it as mentioned above.
> I have also heard of tools such as Codestriker
> http://codestriker.sourceforge.net/,
>
> which apparently integrate with SVN and may be valuable in this
> process as well.
>
> What solutions have you all seen in action? Thanks in advance for any
> other thoughts on the topic.
I've used Review Board
http://www.review-board.org/
It is nice and works well with SVN. I think the best approach is the
way open-source projects like SVN handle it. Developers use svn diff
to create a patch with their changes and mail it, along with the
commit message to a mailing list. Developers can apply the patch and
reply to the email for the review. When you commit your changes, you
note in the commit message who reviewed it. In addition, all commits
are also sent to a mailing list. This allows developers to do
post-commit reviews when they notice something that does not look
right. After all, they may not have been the developer asked to do
the original review, so this is the first time they saw it.
Post-commit reviews can be just as effective as pre-commit, but you
need a team that is committed to doing them.
Finally, in open-source world if committers do not follow the project
standards you use social pressures to get them to comply and if that
fails you simply revoke the commit privs. This works in corporate
settings too. If a developer cannot commit, they will have to send
all their patches to someone else to review and commit. They'll
learn.
--
Thanks
Mark Phippard
http://markphip.blogspot.com/
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2366451
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: SVN with code review workflow
Posted by Stefan Sperling <st...@elego.de>.
On Mon, Jun 29, 2009 at 11:38:19AM -0400, Brian FitzGerald wrote:
> Greetings all,
>
> I am a Web developer with a company who (rightfully so) places a large
> amount of importance on code review. For this reason, up to this
> point, they have not implemented a traditional version control system,
> such as Subversion.
>
> The concern of certain key people in the organization is that putting
> SVN in place would mean losing control of the code base in that
> developers could simply commit whatever, whenever they wanted, without
> going through the highly valued code review process.
The act of committing a change does not set things in stone.
> I understand their concern, and I have a few ideas about what could be
> some potential solutions to our problem, but I wanted to get thoughts
> from others about ways they have seen this tackled.
Subversion (like any other version control tool) is perfectly
suited to help achieve effective code review.
> What solutions have you all seen in action?
See http://producingoss.com/en/setting-tone.html#code-review
Note that this book describes development practices for open source
projects, and draws examples from Subversion's development itself.
But the same process could be used when developing proprietary software
if you're into that kind of thing.
Stefan
Re: SVN with code review workflow
Posted by Les Mikesell <le...@gmail.com>.
Brian FitzGerald wrote:
>
> I am a Web developer with a company who (rightfully so) places a large
> amount of importance on code review. For this reason, up to this
> point, they have not implemented a traditional version control system,
> such as Subversion.
>
> The concern of certain key people in the organization is that putting
> SVN in place would mean losing control of the code base in that
> developers could simply commit whatever, whenever they wanted, without
> going through the highly valued code review process.
Just because someone commits a change to the trunk doesn't mean you have to use
it in production.
> I understand their concern, and I have a few ideas about what could be
> some potential solutions to our problem, but I wanted to get thoughts
> from others about ways they have seen this tackled.
>
> One solution I have heard of large shops using is to have each
> developer have their own branch in the repository, so that once their
> coding is complete, they would commit to their personal branch. Then,
> the code reviewer would perform a commit from the developers branch to
> the (and I get hazy about the specifics here) main development branch
> (would this need to be a separate repository?).
Unless you expect the developers' changes to be disruptive (refactoring,
renaming many files, changing interfaces, etc.) isolating developers is likely
to be counterproductive. Instead you can just recognize that the trunk is where
development happens and the head view won't always be perfect. Just don't build
your production release from trunk/head.
> At this point, the code reviewer could look at all the diffs between
> the code in the developers branch, and the code in the main
> development branch, and either reject or approve and commit the code.
> For updates, developers would grab from the main development
> repository (or branch), so that they would always be synced up with
> the changes committed (and approved) by other developers.
While big changes are being made, this can happen directly in the trunk. When
you are close to a release, branch for the release and do final tuning there
applying whatever quality control approaches you want. That might include code
review and builds with performance tests, perhaps with a limited number of
people allowed to make changes. And, you'd probably make tag copies to identify
each of these changes up through the final one.
--
Les Mikesell
lesmikesell@gmail.com
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2366447
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].