How to verify that code reviewed patch file is exactly what is committed into SVN repository
We have a code review process in place where a developer sends out a patch file with his changes to the team. After reviewing it, he is instructed to commit or make changes and resend.
How can we ensure that what has been "committed" is exactly what has been "approved" - i.e., if he makes subsequent changes without approval 开发者_如何学Pythonand commits those, how can I detect those?
I have the original 'patch file' at my end, but:
- How can I 'generate' something similar between the two committed versions and
- Is it viable to compare those two files?
The easiest way is that The reviewer commit the changes he approved. I've seen some old fashion team (a while ago) where only the project manager could commit to production repository. The thing is, as he has to commit too much stuff he didn't really check anything so that was a bit pointless.
The simplest solution would be to put such patches to a branch which mean the developer will check in the code on the branch. Than a reviewer can check the code and merge the code back to a particular integration line. This makes sure the code checked in is exactly what has been checked. Furthermore this approach has the advanctage the suggestion which have been made will be documented in the version control as well.
I am guessing you could do this by applying the patch on the old revision and then comparing the same against the latest version of code for difference.
You could use svn diff for this.
You probably wanna take a look at this answer: How to make svn diff produce file that patch would apply, when svn cp or svn mv was used?
Reviewer should be a committer as well to make sure he commits the same he reviewed and approved.
精彩评论