May 9, 2013

Spotlight on the Public Depot: a Helpful Job Merger


Did you know Perforce has a public Perforce server, a "Public Depot" if you will, that contains numerous interesting tools and extensions to help you with using and administering Perforce? Well it does, and today I'm going to highlight a recent new addition from our own Sam Stafford: the jobmerge trigger.

In 2006.1 Perforce added a new feature to jobs, our built-in defect tracker, to make sure that users did not accidentally clobber other people's modifications by submitting an old job. Not clobbering changes was certainly an improvement, but there are many times when the changes are non-conflicting and it would be nice if they were quietly merged together. 

Jobmerge.rb makes that possible using a form-in trigger on Perforce jobs. Jobmerge.rb looks at each incoming job and if the modified date is earlier than the current version of the job it does a three way of merge of the incoming version, the current version, and a base version pulled from the spec depot.

For details on installation and usage check out the project page in the Public Depot. While you're there, peruse some of the other great tools hosted in the Public Depot. If there are tools you've been looking for and suspect someone might already have built but not shared, head on over to the forums and see if the community has something for you to use!