diff --git a/Source/MantisSourcePlugin.class.php b/Source/MantisSourcePlugin.class.php index d25a786..d2d7634 100644 --- a/Source/MantisSourcePlugin.class.php +++ b/Source/MantisSourcePlugin.class.php @@ -36,6 +36,7 @@ 'EVENT_SOURCE_COMMIT' => 'commit', 'EVENT_SOURCE_IMPORT_REPO' => 'import_repo', + 'EVENT_SOURCE_IMPORT_LATEST' => 'import_latest', ); } @@ -51,20 +52,13 @@ abstract function url_diff( $p_event, $p_repo, $p_changeset, $p_file ); function update_repo_form( $p_event, $p_repo ) {} - function update_repo( $p_event, $p_repo ) { - return $p_repo; - } + function update_repo( $p_event, $p_repo ) {} - function precommit( $p_event ) { - return null; - } + function precommit( $p_event ) {} + function commit( $p_event, $p_repo, $p_data ) {} - abstract function commit( $p_event, $p_repo, $p_data ); - - function import_repo( $p_event, $p_repo ) { - return; - } - + function import_repo( $p_event, $p_repo ) {} + function import_latest( $p_event, $p_repo ) {} } /** diff --git a/Source/Source.php b/Source/Source.php index badf183..066294c 100644 --- a/Source/Source.php +++ b/Source/Source.php @@ -66,6 +66,7 @@ 'EVENT_SOURCE_COMMIT' => EVENT_TYPE_FIRST, # Source control commit handling, passed commit details from checkin script 'EVENT_SOURCE_IMPORT_REPO' => EVENT_TYPE_FIRST, # Import an existing repository from scratch + 'EVENT_SOURCE_IMPORT_LATEST' => EVENT_TYPE_FIRST, # Import the latest changesets from a repository ); }