The vcstools module provides a Python API for interacting with different version control systems (VCS/SCMs). WWW: http://wiki.ros.org/vcstools