- Repository Owners may edit repositories through the web UI\r
- Gravatar integration\r
- Git-notes display support\r
+- gh-pages display support (Jekyll is not supported)\r
- Branch metrics (uses Google Charts)\r
- HEAD and Branch RSS feeds\r
- Blame annotations view\r
**New:** *web.allowFlashCopyToClipboard = true*\r
- JavaScript-based 3-step (click, ctrl+c, enter) *copy to clipboard* of the primary repository url in the event that you do not want to use Flash on your installation\r
- Empty repositories now link to an *empty repository* page which gives some direction to the user for the next step in using Gitblit. This page displays the primary push/clone url of the repository and gives sample syntax for the git command-line client. (issue 31)\r
+- automatic *gh-pages* branch serving (Jekyll is not supported) \r
+Gitblit does not checkout your gh-pages branch to a temporary filesystem, all page and resource requests are live through the repository\r
- Gitblit Express bundle to get started running Gitblit on RedHat's OpenShift cloud <span class="label warning">BETA</span>\r
\r
#### changes\r
<servlet-name>RpcServlet</servlet-name>\r
<url-pattern>/rpc/*</url-pattern>\r
</servlet-mapping> \r
+\r
+\r
+ <!-- Pages Servlet\r
+ <url-pattern> MUST match: \r
+ * PagesFilter\r
+ * com.gitblit.Constants.PAGES_PATH\r
+ * Wicket Filter ignorePaths parameter -->\r
+ <servlet>\r
+ <servlet-name>PagesServlet</servlet-name>\r
+ <servlet-class>com.gitblit.PagesServlet</servlet-class>\r
+ </servlet>\r
+ <servlet-mapping>\r
+ <servlet-name>PagesServlet</servlet-name> \r
+ <url-pattern>/pages/*</url-pattern>\r
+ </servlet-mapping> \r
\r
- \r
+\r
<!-- Git Access Restriction Filter\r
<url-pattern> MUST match: \r
* GitServlet\r
<url-pattern>/rpc/*</url-pattern>\r
</filter-mapping>\r
\r
- \r
+\r
+ <!-- Pges Restriction Filter\r
+ <url-pattern> MUST match: \r
+ * PagesServlet\r
+ * com.gitblit.Constants.PAGES_PATH\r
+ * Wicket Filter ignorePaths parameter -->\r
+ <filter>\r
+ <filter-name>PagesFilter</filter-name>\r
+ <filter-class>com.gitblit.PagesFilter</filter-class>\r
+ </filter>\r
+ <filter-mapping>\r
+ <filter-name>PagesFilter</filter-name>\r
+ <url-pattern>/pages/*</url-pattern>\r
+ </filter-mapping>\r
+\r
+\r
<!-- Wicket Filter -->\r
<filter>\r
<filter-name>wicketFilter</filter-name>\r
* com.gitblit.Constants.ZIP_PATH\r
* FederationServlet <url-pattern>\r
* RpcFilter <url-pattern>\r
- * RpcServlet <url-pattern> -->\r
- <param-value>git/,feed/,zip/,federation/,rpc/</param-value>\r
+ * RpcServlet <url-pattern>\r
+ * PagesFilter <url-pattern>\r
+ * PagesServlet <url-pattern>\r
+ * com.gitblit.Constants.PAGES_PATH -->\r
+ <param-value>git/,feed/,zip/,federation/,rpc/,pages/</param-value>\r
</init-param>\r
</filter>\r
<filter-mapping>\r
* @return repository or null\r
*/\r
public Repository getRepository(String repositoryName) {\r
+ return getRepository(repositoryName, true);\r
+ }\r
+\r
+ /**\r
+ * Returns the JGit repository for the specified name.\r
+ * \r
+ * @param repositoryName\r
+ * @param logError\r
+ * @return repository or null\r
+ */\r
+ public Repository getRepository(String repositoryName, boolean logError) {\r
Repository r = null;\r
try {\r
r = repositoryResolver.open(null, repositoryName);\r
} catch (RepositoryNotFoundException e) {\r
r = null;\r
- logger.error("GitBlit.getRepository(String) failed to find "\r
- + new File(repositoriesFolder, repositoryName).getAbsolutePath());\r
+ if (logError) {\r
+ logger.error("GitBlit.getRepository(String) failed to find "\r
+ + new File(repositoriesFolder, repositoryName).getAbsolutePath());\r
+ }\r
} catch (ServiceNotAuthorizedException e) {\r
r = null;\r
- logger.error("GitBlit.getRepository(String) failed to find "\r
- + new File(repositoriesFolder, repositoryName).getAbsolutePath(), e);\r
+ if (logError) {\r
+ logger.error("GitBlit.getRepository(String) failed to find "\r
+ + new File(repositoriesFolder, repositoryName).getAbsolutePath(), e);\r
+ }\r
} catch (ServiceNotEnabledException e) {\r
r = null;\r
- logger.error("GitBlit.getRepository(String) failed to find "\r
- + new File(repositoriesFolder, repositoryName).getAbsolutePath(), e);\r
+ if (logError) {\r
+ logger.error("GitBlit.getRepository(String) failed to find "\r
+ + new File(repositoriesFolder, repositoryName).getAbsolutePath(), e);\r
+ }\r
}\r
return r;\r
}\r
--- /dev/null
+/*\r
+ * Copyright 2012 gitblit.com.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package com.gitblit;\r
+\r
+import org.eclipse.jgit.lib.Repository;\r
+\r
+import com.gitblit.Constants.AccessRestrictionType;\r
+import com.gitblit.models.RepositoryModel;\r
+import com.gitblit.models.UserModel;\r
+\r
+/**\r
+ * The PagesFilter is an AccessRestrictionFilter which ensures the gh-pages\r
+ * requests for a view-restricted repository are authenticated and authorized.\r
+ * \r
+ * @author James Moger\r
+ * \r
+ */\r
+public class PagesFilter extends AccessRestrictionFilter {\r
+\r
+ /**\r
+ * Extract the repository name from the url.\r
+ * \r
+ * @param url\r
+ * @return repository name\r
+ */\r
+ @Override\r
+ protected String extractRepositoryName(String url) { \r
+ // get the repository name from the url by finding a known url suffix\r
+ String repository = ""; \r
+ Repository r = null;\r
+ int offset = 0;\r
+ while (r == null) {\r
+ int slash = url.indexOf('/', offset);\r
+ if (slash == -1) {\r
+ repository = url;\r
+ } else {\r
+ repository = url.substring(0, slash);\r
+ }\r
+ r = GitBlit.self().getRepository(repository, false);\r
+ if (r == null) {\r
+ // try again\r
+ offset = slash + 1; \r
+ } else {\r
+ // close the repo\r
+ r.close();\r
+ } \r
+ if (repository.equals(url)) {\r
+ // either only repository in url or no repository found\r
+ break;\r
+ }\r
+ }\r
+ return repository;\r
+ }\r
+\r
+ /**\r
+ * Analyze the url and returns the action of the request.\r
+ * \r
+ * @param url\r
+ * @return action of the request\r
+ */\r
+ @Override\r
+ protected String getUrlRequestAction(String suffix) {\r
+ return "VIEW";\r
+ }\r
+\r
+ /**\r
+ * Determine if the repository requires authentication.\r
+ * \r
+ * @param repository\r
+ * @return true if authentication required\r
+ */\r
+ @Override\r
+ protected boolean requiresAuthentication(RepositoryModel repository) {\r
+ return repository.accessRestriction.atLeast(AccessRestrictionType.VIEW);\r
+ }\r
+\r
+ /**\r
+ * Determine if the user can access the repository and perform the specified\r
+ * action.\r
+ * \r
+ * @param repository\r
+ * @param user\r
+ * @param action\r
+ * @return true if user may execute the action on the repository\r
+ */\r
+ @Override\r
+ protected boolean canAccess(RepositoryModel repository, UserModel user, String action) { \r
+ return user.canAccessRepository(repository);\r
+ }\r
+}\r
--- /dev/null
+/*\r
+ * Copyright 2012 gitblit.com.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package com.gitblit;\r
+\r
+import java.io.IOException;\r
+import java.text.MessageFormat;\r
+import java.text.ParseException;\r
+\r
+import javax.servlet.ServletContext;\r
+import javax.servlet.ServletException;\r
+import javax.servlet.http.HttpServlet;\r
+import javax.servlet.http.HttpServletRequest;\r
+import javax.servlet.http.HttpServletResponse;\r
+\r
+import org.eclipse.jgit.lib.Repository;\r
+import org.eclipse.jgit.revwalk.RevCommit;\r
+import org.eclipse.jgit.revwalk.RevTree;\r
+import org.slf4j.Logger;\r
+import org.slf4j.LoggerFactory;\r
+\r
+import com.gitblit.models.RefModel;\r
+import com.gitblit.utils.ArrayUtils;\r
+import com.gitblit.utils.JGitUtils;\r
+import com.gitblit.utils.MarkdownUtils;\r
+import com.gitblit.utils.StringUtils;\r
+\r
+/**\r
+ * Serves the content of a gh-pages branch.\r
+ * \r
+ * @author James Moger\r
+ * \r
+ */\r
+public class PagesServlet extends HttpServlet {\r
+\r
+ private static final long serialVersionUID = 1L;\r
+\r
+ private transient Logger logger = LoggerFactory.getLogger(PagesServlet.class);\r
+\r
+ public PagesServlet() {\r
+ super();\r
+ }\r
+\r
+ /**\r
+ * Returns an url to this servlet for the specified parameters.\r
+ * \r
+ * @param baseURL\r
+ * @param repository\r
+ * @param path\r
+ * @return an url\r
+ */\r
+ public static String asLink(String baseURL, String repository, String path) {\r
+ if (baseURL.length() > 0 && baseURL.charAt(baseURL.length() - 1) == '/') {\r
+ baseURL = baseURL.substring(0, baseURL.length() - 1);\r
+ }\r
+ return baseURL + Constants.PAGES + repository + "/" + (path == null ? "" : ("/" + path));\r
+ }\r
+\r
+ /**\r
+ * Retrieves the specified resource from the gh-pages branch of the\r
+ * repository.\r
+ * \r
+ * @param request\r
+ * @param response\r
+ * @throws javax.servlet.ServletException\r
+ * @throws java.io.IOException\r
+ */\r
+ private void processRequest(HttpServletRequest request, HttpServletResponse response)\r
+ throws ServletException, IOException {\r
+ String path = request.getPathInfo();\r
+ if (path.toLowerCase().endsWith(".git")) {\r
+ // forward to url with trailing /\r
+ // this is important for relative pages links\r
+ response.sendRedirect(request.getServletPath() + path + "/");\r
+ return;\r
+ }\r
+ if (path.charAt(0) == '/') {\r
+ // strip leading /\r
+ path = path.substring(1);\r
+ }\r
+\r
+ // determine repository and resource from url\r
+ String repository = "";\r
+ String resource = "";\r
+ Repository r = null;\r
+ int offset = 0;\r
+ while (r == null) {\r
+ int slash = path.indexOf('/', offset);\r
+ if (slash == -1) {\r
+ repository = path;\r
+ } else {\r
+ repository = path.substring(0, slash);\r
+ }\r
+ r = GitBlit.self().getRepository(repository, false);\r
+ offset = slash + 1;\r
+ if (offset > 0) {\r
+ resource = path.substring(offset);\r
+ }\r
+ if (repository.equals(path)) {\r
+ // either only repository in url or no repository found\r
+ break;\r
+ }\r
+ }\r
+\r
+ ServletContext context = request.getSession().getServletContext();\r
+\r
+ try {\r
+ if (r == null) {\r
+ // repository not found!\r
+ String mkd = MessageFormat.format(\r
+ "# Error\nSorry, no valid **repository** specified in this url: {0}!",\r
+ repository);\r
+ error(response, mkd);\r
+ return;\r
+ }\r
+\r
+ // retrieve the content from the repository\r
+ RefModel pages = JGitUtils.getPagesBranch(r);\r
+ RevCommit commit = JGitUtils.getCommit(r, pages.getObjectId().getName());\r
+\r
+ if (commit == null) {\r
+ // branch not found!\r
+ String mkd = MessageFormat.format(\r
+ "# Error\nSorry, the repository {0} does not have a **gh-pages** branch!",\r
+ repository);\r
+ error(response, mkd);\r
+ r.close();\r
+ return;\r
+ }\r
+ response.setDateHeader("Last-Modified", JGitUtils.getCommitDate(commit).getTime());\r
+\r
+ RevTree tree = commit.getTree();\r
+ byte[] content = null;\r
+ if (StringUtils.isEmpty(resource)) {\r
+ // find resource\r
+ String[] files = { "index.html", "index.htm", "index.mkd" };\r
+ for (String file : files) {\r
+ content = JGitUtils.getStringContent(r, tree, file)\r
+ .getBytes(Constants.ENCODING);\r
+ if (content != null) {\r
+ resource = file;\r
+ // assume text/html unless the servlet container\r
+ // overrides\r
+ response.setContentType("text/html; charset=" + Constants.ENCODING);\r
+ break;\r
+ }\r
+ }\r
+ } else {\r
+ // specific resource\r
+ String contentType = context.getMimeType(resource);\r
+ if (contentType.startsWith("text")) {\r
+ content = JGitUtils.getStringContent(r, tree, resource).getBytes(\r
+ Constants.ENCODING);\r
+ } else {\r
+ content = JGitUtils.getByteContent(r, tree, resource);\r
+ }\r
+ response.setContentType(contentType);\r
+ }\r
+\r
+ // no content, try custom 404 page\r
+ if (ArrayUtils.isEmpty(content)) {\r
+ content = JGitUtils.getStringContent(r, tree, "404.html").getBytes(\r
+ Constants.ENCODING);\r
+ // still no content\r
+ if (ArrayUtils.isEmpty(content)) {\r
+ content = (MessageFormat.format(\r
+ "# Error\nSorry, the requested resource **{0}** was not found.",\r
+ resource)).getBytes(Constants.ENCODING);\r
+ resource = "404.mkd";\r
+ }\r
+ }\r
+\r
+ // check to see if we should transform markdown files\r
+ for (String ext : GitBlit.getStrings(Keys.web.markdownExtensions)) {\r
+ if (resource.endsWith(ext)) {\r
+ String mkd = new String(content, Constants.ENCODING);\r
+ content = MarkdownUtils.transformMarkdown(mkd).getBytes(Constants.ENCODING);\r
+ break;\r
+ }\r
+ }\r
+\r
+ try {\r
+ // output the content\r
+ response.getOutputStream().write(content);\r
+ response.flushBuffer();\r
+ } catch (Throwable t) {\r
+ logger.error("Failed to write page to client", t);\r
+ }\r
+\r
+ // close the repository\r
+ r.close();\r
+ } catch (Throwable t) {\r
+ logger.error("Failed to write page to client", t);\r
+ }\r
+ }\r
+\r
+ private void error(HttpServletResponse response, String mkd) throws ServletException,\r
+ IOException, ParseException {\r
+ String content = MarkdownUtils.transformMarkdown(mkd);\r
+ response.setContentType("text/html; charset=" + Constants.ENCODING);\r
+ response.getWriter().write(content);\r
+ }\r
+\r
+ @Override\r
+ protected void doPost(HttpServletRequest request, HttpServletResponse response)\r
+ throws ServletException, IOException {\r
+ processRequest(request, response);\r
+ }\r
+\r
+ @Override\r
+ protected void doGet(HttpServletRequest request, HttpServletResponse response)\r
+ throws ServletException, IOException {\r
+ processRequest(request, response);\r
+ }\r
+}\r
*/\r
public class ArrayUtils {\r
\r
+ public static boolean isEmpty(byte [] array) {\r
+ return array == null || array.length == 0;\r
+ }\r
+ \r
public static boolean isEmpty(Object [] array) {\r
return array == null || array.length == 0;\r
}\r
return list;\r
}\r
\r
+ /**\r
+ * Returns a RefModel for the gh-pages branch in the repository. If the\r
+ * branch can not be found, null is returned.\r
+ * \r
+ * @param repository\r
+ * @return a refmodel for the gh-pages branch or null\r
+ */\r
+ public static RefModel getPagesBranch(Repository repository) {\r
+ RefModel ghPages = null;\r
+ try {\r
+ // search for gh-pages branch in local heads\r
+ for (RefModel ref : JGitUtils.getLocalBranches(repository, false, -1)) {\r
+ if (ref.displayName.endsWith("gh-pages")) {\r
+ ghPages = ref;\r
+ break;\r
+ }\r
+ }\r
+\r
+ // search for gh-pages branch in remote heads\r
+ if (ghPages == null) {\r
+ for (RefModel ref : JGitUtils.getRemoteBranches(repository, false, -1)) {\r
+ if (ref.displayName.endsWith("gh-pages")) {\r
+ ghPages = ref;\r
+ break;\r
+ }\r
+ }\r
+ }\r
+ } catch (Throwable t) {\r
+ LOGGER.error("Failed to find gh-pages branch!", t);\r
+ }\r
+ return ghPages;\r
+ }\r
+\r
/**\r
* Returns the list of notes entered about the commit from the refs/notes\r
* namespace. If the repository does not exist or is empty, an empty list is\r
gb.accessPermissionsForTeamDescription = set team members and grant access to specific restricted repositories\r
gb.federationRepositoryDescription = share this repository with other Gitblit servers\r
gb.hookScriptsDescription = run Groovy scripts on pushes to this Gitblit server\r
-gb.reset = reset
\ No newline at end of file
+gb.reset = reset\r
+gb.pages = pages
\ No newline at end of file
this.params = params;\r
}\r
\r
+ /**\r
+ * Represents a page link to a non-Wicket page. Might be external.\r
+ * \r
+ * @author James Moger\r
+ * \r
+ */\r
+ public static class OtherPageLink extends PageRegistration {\r
+\r
+ private static final long serialVersionUID = 1L;\r
+\r
+ public final String url;\r
+\r
+ public OtherPageLink(String translationKey, String url) {\r
+ super(translationKey, null);\r
+ this.url = url;\r
+ }\r
+ }\r
+\r
/**\r
* Represents a DropDownMenu for the topbar\r
* \r
import com.gitblit.Constants;\r
import com.gitblit.GitBlit;\r
import com.gitblit.Keys;\r
+import com.gitblit.PagesServlet;\r
import com.gitblit.SyndicationServlet;\r
import com.gitblit.models.RepositoryModel;\r
import com.gitblit.utils.JGitUtils;\r
import com.gitblit.utils.TicgitUtils;\r
import com.gitblit.wicket.GitBlitWebSession;\r
import com.gitblit.wicket.PageRegistration;\r
+import com.gitblit.wicket.PageRegistration.OtherPageLink;\r
import com.gitblit.wicket.WicketUtils;\r
import com.gitblit.wicket.panels.LinkPanel;\r
import com.gitblit.wicket.panels.NavigationPanel;\r
if (model.useDocs) {\r
pages.put("docs", new PageRegistration("gb.docs", DocsPage.class, params));\r
}\r
+ if (JGitUtils.getPagesBranch(r) != null) {\r
+ OtherPageLink pagesLink = new OtherPageLink("gb.pages", PagesServlet.asLink(\r
+ getRequest().getRelativePathPrefixToContextRoot(), repositoryName, null));\r
+ pages.put("pages", pagesLink);\r
+ }\r
+\r
// Conditionally add edit link\r
final boolean showAdmin;\r
if (GitBlit.getBoolean(Keys.web.authenticateAdminPages, true)) {\r
}\r
\r
@Override\r
- protected void setupPage(String repositoryName, String pageName) { \r
- add(new LinkPanel("repositoryName", null, StringUtils.stripDotGit(repositoryName), SummaryPage.class,\r
- WicketUtils.newRepositoryParameter(repositoryName)));\r
+ protected void setupPage(String repositoryName, String pageName) {\r
+ add(new LinkPanel("repositoryName", null, StringUtils.stripDotGit(repositoryName),\r
+ SummaryPage.class, WicketUtils.newRepositoryParameter(repositoryName)));\r
add(new Label("pageName", pageName));\r
\r
super.setupPage(repositoryName, pageName);\r
}\r
}\r
\r
- protected void setPersonSearchTooltip(Component component, String value, Constants.SearchType searchType) {\r
+ protected void setPersonSearchTooltip(Component component, String value,\r
+ Constants.SearchType searchType) {\r
if (searchType.equals(Constants.SearchType.AUTHOR)) {\r
WicketUtils.setHtmlTooltip(component, getString("gb.searchForAuthor") + " " + value);\r
} else if (searchType.equals(Constants.SearchType.COMMITTER)) {\r
\r
private final IModel<String> searchBoxModel = new Model<String>("");\r
\r
- private final IModel<Constants.SearchType> searchTypeModel = new Model<Constants.SearchType>(Constants.SearchType.COMMIT);\r
+ private final IModel<Constants.SearchType> searchTypeModel = new Model<Constants.SearchType>(\r
+ Constants.SearchType.COMMIT);\r
\r
public SearchForm(String id, String repositoryName) {\r
super(id);\r
this.repositoryName = repositoryName;\r
- DropDownChoice<Constants.SearchType> searchType = new DropDownChoice<Constants.SearchType>("searchType",\r
- Arrays.asList(Constants.SearchType.values()));\r
+ DropDownChoice<Constants.SearchType> searchType = new DropDownChoice<Constants.SearchType>(\r
+ "searchType", Arrays.asList(Constants.SearchType.values()));\r
searchType.setModel(searchTypeModel);\r
add(searchType.setVisible(GitBlit.getBoolean(Keys.web.showSearchTypeSelection, false)));\r
TextField<String> searchBox = new TextField<String>("searchBox", searchBoxModel);\r
import org.apache.wicket.markup.html.WebPage;\r
import org.apache.wicket.markup.html.basic.Label;\r
import org.apache.wicket.markup.html.link.BookmarkablePageLink;\r
+import org.apache.wicket.markup.html.link.ExternalLink;\r
import org.apache.wicket.markup.html.link.Link;\r
import org.apache.wicket.markup.html.panel.Panel;\r
import org.apache.wicket.model.IModel;\r
add(link);\r
}\r
\r
+ public LinkPanel(String wicketId, String linkCssClass, String label, String href) {\r
+ this(wicketId, linkCssClass, label, href, false);\r
+ }\r
+\r
+ public LinkPanel(String wicketId, String linkCssClass, String label, String href,\r
+ boolean newWindow) {\r
+ super(wicketId);\r
+ this.labelModel = new Model<String>(label);\r
+ ExternalLink link = new ExternalLink("link", href);\r
+ if (newWindow) {\r
+ link.add(new SimpleAttributeModifier("target", "_blank"));\r
+ }\r
+ if (linkCssClass != null) {\r
+ link.add(new SimpleAttributeModifier("class", linkCssClass));\r
+ }\r
+ link.add(new Label("label", labelModel));\r
+ add(link);\r
+ }\r
+\r
}\r
\r
import com.gitblit.wicket.PageRegistration;\r
import com.gitblit.wicket.PageRegistration.DropDownMenuRegistration;\r
+import com.gitblit.wicket.PageRegistration.OtherPageLink;\r
import com.gitblit.wicket.WicketUtils;\r
import com.gitblit.wicket.pages.BasePage;\r
\r
\r
public void populateItem(final Item<PageRegistration> item) {\r
PageRegistration entry = item.getModelObject();\r
- if (entry instanceof DropDownMenuRegistration) {\r
+ if (entry instanceof OtherPageLink) {\r
+ // other link\r
+ OtherPageLink link = (OtherPageLink) entry;\r
+ Component c = new LinkPanel("link", null, getString(entry.translationKey), link.url);\r
+ item.add(c);\r
+ } else if (entry instanceof DropDownMenuRegistration) {\r
// drop down menu\r
DropDownMenuRegistration reg = (DropDownMenuRegistration) entry;\r
Component c = new DropDownMenu("link", getString(entry.translationKey), reg);\r
return new FileRepository(new File(REPOSITORIES, "test/bluez-gnome.git"));\r
}\r
\r
+ public static Repository getAmbitionRepository() throws Exception {\r
+ return new FileRepository(new File(REPOSITORIES, "test/ambition.git"));\r
+ }\r
+\r
+ public static Repository getTheoreticalPhysicsRepository() throws Exception {\r
+ return new FileRepository(new File(REPOSITORIES, "test/theoretical-physics.git"));\r
+ }\r
+\r
public static boolean startGitblit() throws Exception {\r
if (started.get()) {\r
// already started\r
"https://git.kernel.org/pub/scm/bluetooth/bluez-gnome.git");\r
cloneOrFetch("test/jgit.git", "https://github.com/eclipse/jgit.git");\r
cloneOrFetch("test/helloworld.git", "https://github.com/git/hello-world.git");\r
-\r
+ cloneOrFetch("test/ambition.git", "https://github.com/defunkt/ambition.git");\r
+ cloneOrFetch("test/theoretical-physics.git", "https://github.com/certik/theoretical-physics.git");\r
+ \r
enableTickets("ticgit.git");\r
enableDocs("ticgit.git");\r
showRemoteBranches("ticgit.git");\r