PRE_ and POST_CREATE should work for normal repos also

This commit is contained in:
Sitaram Chamarty 2012-05-25 12:26:52 +05:30
parent 04367af3e8
commit 0f3a09ce60
3 changed files with 18 additions and 6 deletions

View file

@ -34,6 +34,10 @@ sub compile {
# place to put the individual gl-conf files
new_repos();
store();
for my $repo ( @{ $rc{NEW_REPOS_CREATED} } ) {
trigger( 'POST_CREATE', $repo );
}
}
sub parse {

View file

@ -164,7 +164,11 @@ sub new_repos {
# use gl-conf as a sentinel
hook_1($repo) if -d "$repo.git" and not -f "$repo.git/gl-conf";
new_repo($repo) if not -d "$repo.git";
if (not -d "$repo.git") {
push @{ $rc{NEW_REPOS_CREATED} }, $repo;
trigger( 'PRE_CREATE', $repo );
new_repo($repo);
}
}
}