Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Encourage More Frequent Commits to SVN

A group of developers that I am working with switched from VSS to SVN about half a year ago. The transition from CheckOut-CheckIn to Update-Commit has been hard on a number of users. Now that they are no longer forced to check in their files when they are done (or more accurately, now that no one else can see that they have the file checked out and tell them to check back in in order to release the lock on the file), it has happened on more than one occasion that users have forgotten to Commit their changes until long after they were completed.

Although most users are good about Committing their changes, the issue is serious enough that the decision might be made to force users to get locks on all files in SVN before editing. I would rather not see this happen, but I am at a loss over how to improve the situation in another way. So can anyone suggest ways to do any of the following:

  1. Track what files users have edited but have not yet Committed changes for
  2. Encourage users to be more consistent with Committing changes when they are done
  3. Help finish off the user education necessary to get people used to the new version control paradigm

Out-of-the-box solutions welcome (ie: desktop program that reminds users to commit if they have not done so in a given interval, automatically get stats of user Commit rates and send warning emails if frequency drops below a certain threshold, etc).

like image 946
Yaakov Ellis Avatar asked Feb 22 '10 18:02

Yaakov Ellis


People also ask

What is the ideal frequency of creating a commit?

The general rule (for both scenarios) would be: Commit as often as possible. If you think "it's not ready yet" (because it'll break the build or simply isn't done yet) then create a branch and commit to that branch but make sure you do commit.

Is it good to have many commits?

More commits is great. As long as they get finer-grained and have good messages, they're useful.

Are smaller commits better?

Many Small CommitsThey are easier to understand, easier to test, and easier to review. The complexity of understanding, testing and reviewing a change often increases faster than its size: ten 200-line changes each doing one thing are often far easier to understand than one 2,000 line change doing ten things.


2 Answers

...users have forgotten to Commit their changes until long after they were completed.

I think this is the problem right here. How can a feature/bugfix be "completed" if it isn't checked in? Do you have an issue tracking system that records outstanding issues? Do you have a continuous integration system that runs unit tests as soon as a checkin is made?

If developers are just off doing their own thing with no accountability, then it's not surprising that you're running into problems getting everybody to cooperate. You will need some kind of oversight (project manager? team lead?) who is responsible for making sure that individual developers are cooperating with the rest of the developer team.

like image 161
Greg Hewgill Avatar answered Oct 02 '22 12:10

Greg Hewgill


Do you use any kind of bug/feature tracking software?
You could ask them to include revision number when they tick off the completed work.

like image 31
z-boss Avatar answered Oct 02 '22 10:10

z-boss