user = babaracus\r
repository = topsecret.git\r
mailingList = list@ateam.org\r
+ postReceiveScript = sendmail\r
\r
The `users.conf` file allows flexibility for adding new fields to a UserModel object that the original `users.properties` file does not afford without imposing the complexity of relying on an embedded SQL database. \r
\r
3. Script filenames must not have spaces!\r
4. Scripts must be explicitly specified to be executed, no scripts are *automatically* executed by name or extension.\r
5. A script can be specified to run on *all repositories* by adding the script file name to *groovy.preReceiveScripts* or *groovy.postReceiveScripts* in `gitblit.properties` or `web.xml`.\r
-6. Scripts may also be specified per-repository in the repository's settings.\r
-7. Globally specified scripts are excluded from the list of available scripts in a repository's settings \r
-8. Globally specified scripts are executed first, in their listed order, followed by per-repository scripts, in their listed order.\r
-9. A script may only be defined once in a pre-receive chain and once in a post-receive chain. \r
+6. Scripts can be specified for a team.\r
+7. Scripts may also be specified per-repository in the repository's settings.\r
+8. Globally-specified scripts and team-specified scripts are excluded from the list of available scripts in a repository's settings \r
+9. Globally-specified scripts are executed first, in their listed order; followed by team-specified scripts in their listed order by alphabetical team order; followed by per-repository scripts, in their listed order.\r
+10. A script may only be defined once in a pre-receive chain and once in a post-receive chain. \r
You may execute the same script on pre-receive and post-receive, just not multiple times within a pre-receive or post-receive event.\r
-10. Gitblit does not differentiate between what can be a pre-receive script and what can be a post-receive script.\r
-11. If a script *returns false* then the hook chain is aborted and none of the subsequent scripts will execute.\r
+11. Gitblit does not differentiate between what can be a pre-receive script and what can be a post-receive script.\r
+12. If a script *returns false* then the hook chain is aborted and none of the subsequent scripts will execute.\r
\r
Some sample scripts are included in the GO and WAR distributions to show you how you can tap into Gitblit with the provided bound variables. Additional implementation details may be specified in the header comment of these examples.\r
\r
\r
- updated: Gitblit GO is now monolithic like the WAR build. (issue 30) \r
This change helps adoption of GO in environments without an internet connection or with a restricted connection.\r
-- added: Groovy 1.8.4 and a push hook script mechanism. Hook scripts can be set per-repository or globally for all repositories. \r
+- added: Groovy 1.8.4 and a push hook script mechanism. Hook scripts can be set per-repository, pre-team, or globally for all repositories. \r
Unfortunately this adds another 6 MB to the 8MB Gitblit package, but it allows for a *very* powerful, flexible, platform-independent hook script mechanism. \r
**New:** *groovy.scriptsFolder = groovy* \r
**New:** *groovy.preReceiveScripts =* \r
import java.text.MessageFormat;\r
import java.util.ArrayList;\r
import java.util.Arrays;\r
+import java.util.Collections;\r
import java.util.HashSet;\r
import java.util.List;\r
import java.util.Map;\r
private static final String REPOSITORY = "repository";\r
\r
private static final String ROLE = "role";\r
- \r
+\r
private static final String MAILINGLIST = "mailingList";\r
\r
+ private static final String PRERECEIVE = "preReceiveScript";\r
+\r
+ private static final String POSTRECEIVE = "postReceiveScript";\r
+\r
private final File realmFile;\r
\r
private final Logger logger = LoggerFactory.getLogger(ConfigUserService.class);\r
public List<String> getAllTeamNames() {\r
read();\r
List<String> list = new ArrayList<String>(teams.keySet());\r
+ Collections.sort(list);\r
return list;\r
}\r
\r
} catch (Throwable t) {\r
logger.error(MessageFormat.format("Failed to get teamnames for role {0}!", role), t);\r
}\r
+ Collections.sort(list);\r
return list;\r
}\r
\r
public List<String> getAllUsernames() {\r
read();\r
List<String> list = new ArrayList<String>(users.keySet());\r
+ Collections.sort(list);\r
return list;\r
}\r
\r
} catch (Throwable t) {\r
logger.error(MessageFormat.format("Failed to get usernames for role {0}!", role), t);\r
}\r
+ Collections.sort(list);\r
return list;\r
}\r
\r
}\r
\r
// null check on "final" mailing lists because JSON-sourced\r
- // TeamModel\r
- // can have a null users object\r
+ // TeamModel can have a null users object\r
if (model.mailingLists != null) {\r
config.setStringList(TEAM, model.name, MAILINGLIST, new ArrayList<String>(\r
model.mailingLists));\r
}\r
+\r
+ // null check on "final" preReceiveScripts because JSON-sourced\r
+ // TeamModel can have a null preReceiveScripts object\r
+ if (model.preReceiveScripts != null) {\r
+ config.setStringList(TEAM, model.name, PRERECEIVE, model.preReceiveScripts);\r
+ }\r
+\r
+ // null check on "final" postReceiveScripts because JSON-sourced\r
+ // TeamModel can have a null postReceiveScripts object\r
+ if (model.postReceiveScripts != null) {\r
+ config.setStringList(TEAM, model.name, POSTRECEIVE, model.postReceiveScripts);\r
+ }\r
}\r
\r
config.save();\r
team.addRepositories(Arrays.asList(config.getStringList(TEAM, teamname,\r
REPOSITORY)));\r
team.addUsers(Arrays.asList(config.getStringList(TEAM, teamname, USER)));\r
- team.addMailingLists(Arrays.asList(config.getStringList(TEAM, teamname, MAILINGLIST)));\r
+ team.addMailingLists(Arrays.asList(config.getStringList(TEAM, teamname,\r
+ MAILINGLIST)));\r
+ team.preReceiveScripts.addAll(Arrays.asList(config.getStringList(TEAM,\r
+ teamname, PRERECEIVE)));\r
+ team.postReceiveScripts.addAll(Arrays.asList(config.getStringList(TEAM,\r
+ teamname, POSTRECEIVE)));\r
\r
teams.put(team.name.toLowerCase(), team);\r
\r
import java.io.IOException;\r
import java.text.MessageFormat;\r
import java.util.ArrayList;\r
+import java.util.Collections;\r
import java.util.HashSet;\r
import java.util.List;\r
import java.util.Map;\r
}\r
list.add(user);\r
}\r
+ Collections.sort(list);\r
return list;\r
}\r
\r
} catch (Throwable t) {\r
logger.error(MessageFormat.format("Failed to get usernames for role {0}!", role), t);\r
}\r
+ Collections.sort(list);\r
return list;\r
}\r
\r
List<String> repositories = new ArrayList<String>();\r
List<String> users = new ArrayList<String>();\r
List<String> mailingLists = new ArrayList<String>();\r
+ List<String> preReceive = new ArrayList<String>();\r
+ List<String> postReceive = new ArrayList<String>();\r
for (String role : roles) {\r
if (role.charAt(0) == '!') {\r
users.add(role.substring(1));\r
} else if (role.charAt(0) == '&') {\r
- mailingLists.add(role.substring(1));\r
+ mailingLists.add(role.substring(1));\r
+ } else if (role.charAt(0) == '^') {\r
+ preReceive.add(role.substring(1));\r
+ } else if (role.charAt(0) == '%') {\r
+ postReceive.add(role.substring(1));\r
} else {\r
repositories.add(role);\r
}\r
@Override\r
public List<String> getAllTeamNames() {\r
List<String> list = new ArrayList<String>(teams.keySet());\r
+ Collections.sort(list);\r
return list;\r
}\r
\r
} catch (Throwable t) {\r
logger.error(MessageFormat.format("Failed to get teamnames for role {0}!", role), t);\r
}\r
+ Collections.sort(list);\r
return list;\r
}\r
\r
sb.append(address);\r
sb.append(',');\r
}\r
+ for (String script : model.preReceiveScripts) {\r
+ sb.append('^');\r
+ sb.append(script);\r
+ sb.append(',');\r
+ }\r
+ for (String script : model.postReceiveScripts) {\r
+ sb.append('%');\r
+ sb.append(script);\r
+ sb.append(',');\r
+ }\r
// trim trailing comma\r
sb.setLength(sb.length() - 1);\r
allUsers.remove("@" + teamname);\r
import java.util.Collection;\r
import java.util.Collections;\r
import java.util.HashMap;\r
-import java.util.HashSet;\r
+import java.util.LinkedHashSet;\r
import java.util.List;\r
import java.util.Map;\r
import java.util.Map.Entry;\r
import java.util.Set;\r
+import java.util.TreeSet;\r
import java.util.concurrent.ConcurrentHashMap;\r
import java.util.concurrent.Executors;\r
import java.util.concurrent.ScheduledExecutorService;\r
}\r
\r
/**\r
- * Returns the list of all available Groovy push hook scripts that are not\r
- * already specified globally for all repositories. Script files must have\r
+ * Returns the list of all Groovy push hook scripts. Script files must have\r
* .groovy extension\r
* \r
* @return list of available hook scripts\r
*/\r
- public List<String> getAvailableScripts() {\r
+ public List<String> getAllScripts() {\r
File groovyFolder = getGroovyScriptsFolder();\r
File[] files = groovyFolder.listFiles(new FileFilter() {\r
@Override\r
return pathname.isFile() && pathname.getName().endsWith(".groovy");\r
}\r
});\r
-\r
- Set<String> globals = new HashSet<String>();\r
- String[] keys = { Keys.groovy.preReceiveScripts, Keys.groovy.postReceiveScripts };\r
- for (String key : keys) {\r
- for (String script : getStrings(key)) {\r
- if (script.endsWith(".groovy")) {\r
- globals.add(script.substring(0, script.lastIndexOf('.')));\r
- } else {\r
- globals.add(script);\r
- }\r
- }\r
- }\r
-\r
- // create list of available scripts by excluding scripts that are\r
- // globally specified\r
List<String> scripts = new ArrayList<String>();\r
if (files != null) {\r
for (File file : files) {\r
String script = file.getName().substring(0, file.getName().lastIndexOf('.'));\r
- if (!globals.contains(script)) {\r
- scripts.add(script);\r
- }\r
+ scripts.add(script);\r
}\r
}\r
return scripts;\r
}\r
- \r
- public List<String> getInheritedPreReceiveScripts(RepositoryModel repository) {\r
- Set<String> globals = new HashSet<String>();\r
+\r
+ /**\r
+ * Returns the list of pre-receive scripts the repository inherited from the\r
+ * global settings and team affiliations.\r
+ * \r
+ * @param repository\r
+ * if null only the globally specified scripts are returned\r
+ * @return a list of scripts\r
+ */\r
+ public List<String> getPreReceiveScriptsInherited(RepositoryModel repository) {\r
+ Set<String> scripts = new LinkedHashSet<String>();\r
+ // Globals\r
for (String script : getStrings(Keys.groovy.preReceiveScripts)) {\r
if (script.endsWith(".groovy")) {\r
- globals.add(script.substring(0, script.lastIndexOf('.')));\r
+ scripts.add(script.substring(0, script.lastIndexOf('.')));\r
} else {\r
- globals.add(script);\r
+ scripts.add(script);\r
+ }\r
+ }\r
+\r
+ // Team Scripts\r
+ if (repository != null) {\r
+ for (String teamname : userService.getTeamnamesForRepositoryRole(repository.name)) {\r
+ TeamModel team = userService.getTeamModel(teamname);\r
+ scripts.addAll(team.preReceiveScripts);\r
+ }\r
+ }\r
+ return new ArrayList<String>(scripts);\r
+ }\r
+\r
+ /**\r
+ * Returns the list of all available Groovy pre-receive push hook scripts\r
+ * that are not already inherited by the repository. Script files must have\r
+ * .groovy extension\r
+ * \r
+ * @param repository\r
+ * optional parameter\r
+ * @return list of available hook scripts\r
+ */\r
+ public List<String> getPreReceiveScriptsUnused(RepositoryModel repository) {\r
+ Set<String> inherited = new TreeSet<String>(getPreReceiveScriptsInherited(repository));\r
+\r
+ // create list of available scripts by excluding inherited scripts\r
+ List<String> scripts = new ArrayList<String>();\r
+ for (String script : getAllScripts()) {\r
+ if (!inherited.contains(script)) {\r
+ scripts.add(script);\r
}\r
}\r
- return new ArrayList<String>(globals);\r
+ return scripts;\r
}\r
- \r
- public List<String> getInheritedPostReceiveScripts(RepositoryModel repository) {\r
- Set<String> globals = new HashSet<String>();\r
+\r
+ /**\r
+ * Returns the list of post-receive scripts the repository inherited from\r
+ * the global settings and team affiliations.\r
+ * \r
+ * @param repository\r
+ * if null only the globally specified scripts are returned\r
+ * @return a list of scripts\r
+ */\r
+ public List<String> getPostReceiveScriptsInherited(RepositoryModel repository) {\r
+ Set<String> scripts = new LinkedHashSet<String>();\r
+ // Global Scripts\r
for (String script : getStrings(Keys.groovy.postReceiveScripts)) {\r
if (script.endsWith(".groovy")) {\r
- globals.add(script.substring(0, script.lastIndexOf('.')));\r
+ scripts.add(script.substring(0, script.lastIndexOf('.')));\r
} else {\r
- globals.add(script);\r
+ scripts.add(script);\r
+ }\r
+ }\r
+ // Team Scripts\r
+ if (repository != null) {\r
+ for (String teamname : userService.getTeamnamesForRepositoryRole(repository.name)) {\r
+ TeamModel team = userService.getTeamModel(teamname);\r
+ scripts.addAll(team.postReceiveScripts);\r
}\r
}\r
- return new ArrayList<String>(globals);\r
+ return new ArrayList<String>(scripts);\r
+ }\r
+\r
+ /**\r
+ * Returns the list of unused Groovy post-receive push hook scripts that are\r
+ * not already inherited by the repository. Script files must have .groovy\r
+ * extension\r
+ * \r
+ * @param repository\r
+ * optional parameter\r
+ * @return list of available hook scripts\r
+ */\r
+ public List<String> getPostReceiveScriptsUnused(RepositoryModel repository) {\r
+ Set<String> inherited = new TreeSet<String>(getPostReceiveScriptsInherited(repository));\r
+\r
+ // create list of available scripts by excluding inherited scripts\r
+ List<String> scripts = new ArrayList<String>();\r
+ for (String script : getAllScripts()) {\r
+ if (!inherited.contains(script)) {\r
+ scripts.add(script);\r
+ }\r
+ }\r
+ return scripts;\r
}\r
\r
/**\r
setting.currentValue = settings.getString(key, "");\r
}\r
}\r
- settingsModel.pushScripts = getAvailableScripts();\r
+ settingsModel.pushScripts = getAllScripts();\r
return settingsModel;\r
}\r
\r
}\r
\r
/**\r
- * Transitional wrapper class to configure the JGit 1.2 GitFilter.\r
- * This GitServlet will probably be replaced by a GitFilter so that Gitblit\r
- * can serve Git repositories on the root URL and not a /git sub-url.\r
+ * Transitional wrapper class to configure the JGit 1.2 GitFilter. This\r
+ * GitServlet will probably be replaced by a GitFilter so that Gitblit can\r
+ * serve Git repositories on the root URL and not a /git sub-url.\r
* \r
* @author James Moger\r
* \r
*/\r
@Override\r
public void onPreReceive(ReceivePack rp, Collection<ReceiveCommand> commands) {\r
- Set<String> scripts = new LinkedHashSet<String>();\r
- scripts.addAll(GitBlit.getStrings(Keys.groovy.preReceiveScripts));\r
RepositoryModel repository = getRepositoryModel(rp);\r
+ Set<String> scripts = new LinkedHashSet<String>();\r
+ scripts.addAll(GitBlit.self().getPreReceiveScriptsInherited(repository));\r
scripts.addAll(repository.preReceiveScripts);\r
UserModel user = getUserModel(rp);\r
runGroovy(repository, user, commands, scripts);\r
logger.info("skipping post-receive hooks, no refs created, updated, or removed");\r
return;\r
}\r
- Set<String> scripts = new LinkedHashSet<String>();\r
- scripts.addAll(GitBlit.getStrings(Keys.groovy.postReceiveScripts));\r
RepositoryModel repository = getRepositoryModel(rp);\r
+ Set<String> scripts = new LinkedHashSet<String>();\r
+ scripts.addAll(GitBlit.self().getPostReceiveScriptsInherited(repository));\r
scripts.addAll(repository.postReceiveScripts);\r
UserModel user = getUserModel(rp);\r
runGroovy(repository, user, commands, scripts);\r
package com.gitblit.models;\r
\r
import java.io.Serializable;\r
+import java.util.ArrayList;\r
import java.util.Collection;\r
import java.util.HashSet;\r
import java.util.List;\r
public final Set<String> users = new HashSet<String>();\r
public final Set<String> repositories = new HashSet<String>();\r
public final Set<String> mailingLists = new HashSet<String>();\r
+ public final List<String> preReceiveScripts = new ArrayList<String>();\r
+ public final List<String> postReceiveScripts = new ArrayList<String>();\r
\r
public TeamModel(String name) {\r
this.name = name;\r
}\r
final Palette<String> preReceivePalette = new Palette<String>("preReceiveScripts",\r
new ListModel<String>(preReceiveScripts), new CollectionModel<String>(GitBlit\r
- .self().getAvailableScripts()), new ChoiceRenderer<String>("", ""), 12,\r
- true);\r
+ .self().getPreReceiveScriptsUnused(repositoryModel)),\r
+ new ChoiceRenderer<String>("", ""), 12, true);\r
\r
// post-receive palette\r
if (repositoryModel.postReceiveScripts != null) {\r
}\r
final Palette<String> postReceivePalette = new Palette<String>("postReceiveScripts",\r
new ListModel<String>(postReceiveScripts), new CollectionModel<String>(GitBlit\r
- .self().getAvailableScripts()), new ChoiceRenderer<String>("", ""), 12,\r
- true);\r
+ .self().getPostReceiveScriptsUnused(repositoryModel)),\r
+ new ChoiceRenderer<String>("", ""), 12, true);\r
\r
CompoundPropertyModel<RepositoryModel> model = new CompoundPropertyModel<RepositoryModel>(\r
repositoryModel);\r
form.add(teamsPalette);\r
form.add(federationSetsPalette);\r
form.add(preReceivePalette);\r
- form.add(new BulletListPanel("inheritedPreReceive", "inherited", GitBlit.self().getInheritedPreReceiveScripts(repositoryModel)));\r
+ form.add(new BulletListPanel("inheritedPreReceive", "inherited", GitBlit.self()\r
+ .getPreReceiveScriptsInherited(repositoryModel)));\r
form.add(postReceivePalette);\r
- form.add(new BulletListPanel("inheritedPostReceive", "inherited", GitBlit.self().getInheritedPostReceiveScripts(repositoryModel)));\r
+ form.add(new BulletListPanel("inheritedPostReceive", "inherited", GitBlit.self()\r
+ .getPostReceiveScriptsInherited(repositoryModel)));\r
\r
form.add(new Button("save"));\r
Button cancel = new Button("cancel") {\r
<tr><th style="vertical-align: top;"><wicket:message key="gb.teamMembers"></wicket:message></th><td style="padding:2px;"><span wicket:id="users"></span></td></tr>\r
<tr><td colspan="2"><hr></hr></td></tr>\r
<tr><th style="vertical-align: top;"><wicket:message key="gb.restrictedRepositories"></wicket:message></th><td style="padding:2px;"><span wicket:id="repositories"></span></td></tr>\r
+ <tr><td colspan="2"><h3><wicket:message key="gb.hookScripts"></wicket:message> <small><wicket:message key="gb.hookScriptsDescription"></wicket:message></small></h3></td></tr> \r
+ <tr><th style="vertical-align: top;"><wicket:message key="gb.preReceiveScripts"></wicket:message><p></p><span wicket:id="inheritedPreReceive"></span></th><td style="padding:2px;"><span wicket:id="preReceiveScripts"></span></td></tr>\r
+ <tr><th style="vertical-align: top;"><wicket:message key="gb.postReceiveScripts"></wicket:message><p></p><span wicket:id="inheritedPostReceive"></span></th><td style="padding:2px;"><span wicket:id="postReceiveScripts"></span></td></tr>\r
<tr><td colspan='2'><div class="actions"><input class="btn" type="submit" value="Cancel" wicket:message="value:gb.cancel" wicket:id="cancel" tabindex="3" /> <input class="btn primary" type="submit" value="Save" wicket:message="value:gb.save" wicket:id="save" tabindex="4" /></div></td></tr>\r
</tbody>\r
</table>\r
import com.gitblit.utils.StringUtils;\r
import com.gitblit.wicket.RequiresAdminRole;\r
import com.gitblit.wicket.WicketUtils;\r
+import com.gitblit.wicket.panels.BulletListPanel;\r
\r
@RequiresAdminRole\r
public class EditTeamPage extends RootSubPage {\r
} else {\r
super.setupPage(getString("gb.edit"), teamModel.name);\r
}\r
- \r
+\r
CompoundPropertyModel<TeamModel> model = new CompoundPropertyModel<TeamModel>(teamModel);\r
\r
List<String> repos = new ArrayList<String>();\r
}\r
}\r
StringUtils.sortRepositorynames(repos);\r
- \r
+\r
List<String> teamUsers = new ArrayList<String>(teamModel.users);\r
Collections.sort(teamUsers);\r
- \r
+ List<String> preReceiveScripts = new ArrayList<String>();\r
+ List<String> postReceiveScripts = new ArrayList<String>();\r
+\r
final String oldName = teamModel.name;\r
+\r
+ // repositories palette\r
final Palette<String> repositories = new Palette<String>("repositories",\r
new ListModel<String>(new ArrayList<String>(teamModel.repositories)),\r
new CollectionModel<String>(repos), new ChoiceRenderer<String>("", ""), 10, false);\r
+\r
+ // users palette\r
final Palette<String> users = new Palette<String>("users", new ListModel<String>(\r
new ArrayList<String>(teamUsers)), new CollectionModel<String>(GitBlit.self()\r
.getAllUsernames()), new ChoiceRenderer<String>("", ""), 10, false);\r
+\r
+ // pre-receive palette\r
+ if (teamModel.preReceiveScripts != null) {\r
+ preReceiveScripts.addAll(teamModel.preReceiveScripts);\r
+ }\r
+ final Palette<String> preReceivePalette = new Palette<String>("preReceiveScripts",\r
+ new ListModel<String>(preReceiveScripts), new CollectionModel<String>(GitBlit\r
+ .self().getPreReceiveScriptsUnused(null)), new ChoiceRenderer<String>("",\r
+ ""), 12, true);\r
+\r
+ // post-receive palette\r
+ if (teamModel.postReceiveScripts != null) {\r
+ postReceiveScripts.addAll(teamModel.postReceiveScripts);\r
+ }\r
+ final Palette<String> postReceivePalette = new Palette<String>("postReceiveScripts",\r
+ new ListModel<String>(postReceiveScripts), new CollectionModel<String>(GitBlit\r
+ .self().getPostReceiveScriptsUnused(null)), new ChoiceRenderer<String>("",\r
+ ""), 12, true);\r
+\r
Form<TeamModel> form = new Form<TeamModel>("editForm", model) {\r
\r
private static final long serialVersionUID = 1L;\r
teamModel.mailingLists.clear();\r
teamModel.mailingLists.addAll(list);\r
}\r
- \r
+\r
+ // pre-receive scripts\r
+ List<String> preReceiveScripts = new ArrayList<String>();\r
+ Iterator<String> pres = preReceivePalette.getSelectedChoices();\r
+ while (pres.hasNext()) {\r
+ preReceiveScripts.add(pres.next());\r
+ }\r
+ teamModel.preReceiveScripts.clear();\r
+ teamModel.preReceiveScripts.addAll(preReceiveScripts);\r
+\r
+ // post-receive scripts\r
+ List<String> postReceiveScripts = new ArrayList<String>();\r
+ Iterator<String> post = postReceivePalette.getSelectedChoices();\r
+ while (post.hasNext()) {\r
+ postReceiveScripts.add(post.next());\r
+ }\r
+ teamModel.postReceiveScripts.clear();\r
+ teamModel.postReceiveScripts.addAll(postReceiveScripts);\r
+\r
try {\r
GitBlit.self().updateTeamModel(oldName, teamModel, isCreate);\r
} catch (GitBlitException e) {\r
mailingLists = new Model<String>(teamModel.mailingLists == null ? ""\r
: StringUtils.flattenStrings(teamModel.mailingLists, " "));\r
form.add(new TextField<String>("mailingLists", mailingLists));\r
- \r
+\r
form.add(repositories);\r
+ form.add(preReceivePalette);\r
+ form.add(new BulletListPanel("inheritedPreReceive", "inherited", GitBlit.self()\r
+ .getPreReceiveScriptsInherited(null)));\r
+ form.add(postReceivePalette);\r
+ form.add(new BulletListPanel("inheritedPostReceive", "inherited", GitBlit.self()\r
+ .getPostReceiveScriptsInherited(null)));\r
\r
form.add(new Button("save"));\r
Button cancel = new Button("cancel") {\r