From cb285cbfddfc0b633d6b8cdb4dc0d2bd2b8b51ef Mon Sep 17 00:00:00 2001 From: James Moger <james.moger@gitblit.com> Date: Thu, 05 Jan 2012 17:34:05 -0500 Subject: [PATCH] Fixed bug in receive hook for repositories in subfolders --- src/com/gitblit/client/RepositoriesPanel.java | 16 +++++++++++++--- 1 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/com/gitblit/client/RepositoriesPanel.java b/src/com/gitblit/client/RepositoriesPanel.java index cd3f46b..104010d 100644 --- a/src/com/gitblit/client/RepositoriesPanel.java +++ b/src/com/gitblit/client/RepositoriesPanel.java @@ -277,7 +277,7 @@ protected abstract void subscribeFeeds(List<FeedModel> feeds); protected abstract void updateUsersTable(); - + protected abstract void updateTeamsTable(); protected void disableManagement() { @@ -357,6 +357,10 @@ dialog.setTeams(gitblit.getTeamnames(), null); dialog.setRepositories(gitblit.getRepositories()); dialog.setFederationSets(gitblit.getFederationSets(), null); + dialog.setPreReceiveScripts(gitblit.getPreReceiveScriptsUnused(null), + gitblit.getPreReceiveScriptsInherited(null), null); + dialog.setPostReceiveScripts(gitblit.getPostReceiveScriptsUnused(null), + gitblit.getPostReceiveScriptsInherited(null), null); dialog.setVisible(true); final RepositoryModel newRepository = dialog.getRepository(); final List<String> permittedUsers = dialog.getPermittedUsers(); @@ -369,7 +373,8 @@ @Override protected Boolean doRequest() throws IOException { - boolean success = gitblit.createRepository(newRepository, permittedUsers, permittedTeams); + boolean success = gitblit.createRepository(newRepository, permittedUsers, + permittedTeams); if (success) { gitblit.refreshRepositories(); if (permittedUsers.size() > 0) { @@ -405,7 +410,8 @@ * @param repository */ protected void editRepository(final RepositoryModel repository) { - EditRepositoryDialog dialog = new EditRepositoryDialog(gitblit.getProtocolVersion(), repository); + EditRepositoryDialog dialog = new EditRepositoryDialog(gitblit.getProtocolVersion(), + repository); dialog.setLocationRelativeTo(RepositoriesPanel.this); List<String> usernames = gitblit.getUsernames(); List<String> members = gitblit.getPermittedUsernames(repository); @@ -413,6 +419,10 @@ dialog.setTeams(gitblit.getTeamnames(), gitblit.getPermittedTeamnames(repository)); dialog.setRepositories(gitblit.getRepositories()); dialog.setFederationSets(gitblit.getFederationSets(), repository.federationSets); + dialog.setPreReceiveScripts(gitblit.getPreReceiveScriptsUnused(repository), + gitblit.getPreReceiveScriptsInherited(repository), repository.preReceiveScripts); + dialog.setPostReceiveScripts(gitblit.getPostReceiveScriptsUnused(repository), + gitblit.getPostReceiveScriptsInherited(repository), repository.postReceiveScripts); dialog.setVisible(true); final RepositoryModel revisedRepository = dialog.getRepository(); final List<String> permittedUsers = dialog.getPermittedUsers(); -- Gitblit v1.9.1