The Git Backend can be used to retrieve and view commit information. The commit information can either be retreived automatically through the use of the xgit scripts or using the fetch now link on the project administration repository page. The logs are then defaultly avaliable through the commitlog page.
Information reguarding the setup of xgit scripts is aviable in the README.txt located in the xgit directory.
If you have any questions, comments, or feature requests please visit the module page and post your concerns in the issue quene.
'; } return $output; } /** * Implementation of hook_versioncontrol_backends(). */ function versioncontrol_git_versioncontrol_backends() { if (!class_exists('VersioncontrolGitBackend')) { // We're in some weird environment where autoload hasn't done its thing yet. require_once drupal_get_path('module', 'versioncontrol') . '/includes/VersioncontrolBackend.php'; require_once drupal_get_path('module', 'versioncontrol_git') . '/includes/VersioncontrolGitBackend.php'; } return array( 'git' => new VersioncontrolGitBackend() ); } /** * Implementation of hook_cron() */ function versioncontrol_git_cron() { $constraints = array( 'vcs' => array('git') ); $git_repositories = versioncontrol_repository_load_multiple(array(), $constraints); // Set timeout limit to 3600 seconds as it can take a long time to process // the log initially. (And hook_cron() might be called by poormanscron.) if (!ini_get('safe_mode')) { set_time_limit(3600); } foreach ($git_repositories as $repository) { if ($repository->update_method != VERSIONCONTROL_UPDATE_LOG_PARSE_ON_CRON) { // get repositories that have log fetching enabled continue; } $repository->fetchLogs(); } } /** * Implements hook_views_api(). * */ function versioncontrol_git_views_api() { return array( 'api' => 2, 'path' => drupal_get_path('module', 'versioncontrol_git'). '/includes/views', ); } /** * Get & verify the path to the git binary. * * @param bool $error * Whether or not to throw an error if the git binary could not be found. * * @return string * The string path to the git binary, or FALSE if none could be verified. */ function _versioncontrol_git_get_binary_path($error = TRUE) { $git_bin = variable_get('versioncontrol_git_binary_path', 'git'); if ($errors = _versioncontrol_git_binary_check_path($git_bin)) { watchdog('versioncontrol_git', '!errors', array('!errors' => implode('git
binary was not found on the $PATH
, try to set manually the absolute path to the git binary at %link', array('%link' => l('configuration', 'admin/settings/versioncontrol-settings')));
return $errors;
}
}
if (!is_file($path)) {
$errors[] = t('The specified git path %file does not exist.', array('%file' => $path));
}
elseif (!is_executable($path)) {
$errors[] = t('The specified git path %file is not executable.', array('%file' => $path));
}
if ($errors && $open_basedir = ini_get('open_basedir')) {
$errors[] = t('PHP\'s open_basedir security restriction is set to %open-basedir, which may be interfering with attempts to locate git.', array('%file' => $path, '%open-basedir' => $open_basedir, '!info-link' => url('http://php.net/features.safe-mode#ini.open-basedir')));
}
return $errors;
}
/**
* Implementation of ctools hook_ctools_plugin_directory().
*/
function versioncontrol_git_ctools_plugin_directory($module, $plugin) {
if ($module == 'versioncontrol') {
return "includes/plugins/$plugin";
}
}