Using Server-Side Hooks On Subversion and Git

By Adrian Bridgwater, July 04, 2013

Assembla cloud-hosted repository offers control over repositories and source code

Assembla has released a library of server-side hooks for enhanced workflow and collaboration. Intended to bring control over repositories and source code management, this server-side hook library gives extra power to developers and system administrators.

Webcasts

Amid unconfirmed claims of being "first to market" for a "never before available" offering, Assembla CTO Michael Chletsos says that until now, server-side hooks have only been available for those who maintain their own repositories. He further claims that this requires hardware, infrastructure, and administration.

NOTE: Server-side hooks are scripts that run both before and after content is pushed to the server.

If the "min length" server-side hook is installed, a user can set a minimum required length for the commit message. If code is committed without a commit message of a certain minimum length, the code is rejected and not committed.

This ensures commit messages are properly formatted. The benefits of server-side hooks extend to any tasks requiring automation that relies on external web hooks, including checking code for syntax. In short, it makes it easy to manage multiple contributions from a distributed team to a single repository and prevents commits that do not comply with coding standards.

"In addition to providing a library of server-side hooks, Assembla allows users to contribute their own hooks. If a hook is approved, we will make them available for everyone to use," said Chletsos.

Server-side hooks are currently available in Assembla's Subversion and Git code repositories.

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task.
However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

Dr. Dobb's has gone green! Dr. Dobb's Journal Digital Edition will only be available in digital format going forward. A complimentary one-year digital subscription to Dr. Dobb's Journal Digital Edition will be sent to applicants who qualify.