Fixed broken urls for WAR builds.
| | |
| | | All dependencies are bundled.
|
| | | </ul>
|
| | |
|
| | | ### Tools
|
| | | <ul class='noBullets'>
|
| | | <li>*Gitblit Federation Client* - a command line tool to clone/pull groups of repositories and optionally users and settings
|
| | | </ul>
|
| | |
|
| | | ### Java Runtime Requirement
|
| | |
|
| | | Gitblit requires a Java 6 Runtime Environment (JRE) or a Java 6 Development Kit (JDK).
|
| | |
|
| | | ### Current Release
|
| | |
|
| | | **%VERSION%** ([go](http://code.google.com/p/gitblit/downloads/detail?name=%GO%)|[war](http://code.google.com/p/gitblit/downloads/detail?name=%WAR%)) based on [%JGIT%][jgit] *released %BUILDDATE%*
|
| | | **%VERSION%** ([go](http://code.google.com/p/gitblit/downloads/detail?name=%GO%)|[war](http://code.google.com/p/gitblit/downloads/detail?name=%WAR%)|[fedclient](http://code.google.com/p/gitblit/downloads/detail?name=%FEDCLIENT%)) based on [%JGIT%][jgit] *released %BUILDDATE%*
|
| | |
|
| | | - added: federation feature to allow gitblit instances to pull repositories and, optionally, settings and accounts from other gitblit instances.<br/>
|
| | | This is something like svn-sync for gitblit.
|
| | | - added: federation feature to allow gitblit instances (or gitblit federation clients) to pull repositories and, optionally, settings and accounts from other gitblit instances. This is something like [svn-sync](http://svnbook.red-bean.com/en/1.5/svn.ref.svnsync.html) for gitblit.
|
| | | <br/>**New:** *federation.name =*
|
| | | <br/>**New:** *federation.passphrase =*
|
| | | <br/>**New:** *federation.allowProposals = false*
|
| | |
| | | - updated: MarkdownPapers 1.1.1
|
| | | - updated: Wicket 1.4.18
|
| | | - updated: JGit 1.1.0
|
| | | - fixed: syndication urls for WAR builds
|
| | |
|
| | | issues, binaries, and sources @ [Google Code][googlecode]<br/>
|
| | | sources @ [Github][gitbltsrc]
|
| | |
| | | ## Release History
|
| | |
|
| | | ### Current Release
|
| | | **%VERSION%** ([go](http://code.google.com/p/gitblit/downloads/detail?name=%GO%)|[war](http://code.google.com/p/gitblit/downloads/detail?name=%WAR%)) based on [%JGIT%][jgit] *released %BUILDDATE%*
|
| | | **%VERSION%** ([go](http://code.google.com/p/gitblit/downloads/detail?name=%GO%)|[war](http://code.google.com/p/gitblit/downloads/detail?name=%WAR%)|[fedclient](http://code.google.com/p/gitblit/downloads/detail?name=%FEDCLIENT%)) based on [%JGIT%][jgit] *released %BUILDDATE%*
|
| | |
|
| | | - added: federation feature to allow gitblit instances to pull repositories and, optionally, settings and accounts from other gitblit instances.<br/>
|
| | | This is something like svn-sync for gitblit.
|
| | | - added: federation feature to allow gitblit instances (or gitblit federation clients) to pull repositories and, optionally, settings and accounts from other gitblit instances. This is something like [svn-sync](http://svnbook.red-bean.com/en/1.5/svn.ref.svnsync.html) for gitblit.
|
| | | <br/>**New:** *federation.name =*
|
| | | <br/>**New:** *federation.passphrase =*
|
| | | <br/>**New:** *federation.allowProposals = false*
|
| | |
| | | - updated: MarkdownPapers 1.1.1
|
| | | - updated: Wicket 1.4.18
|
| | | - updated: JGit 1.1.0
|
| | | - fixed: syndication urls for WAR builds
|
| | |
|
| | | ### Older Releases
|
| | |
|
| | |
| | |
|
| | | AccessRestrictionRequest accessRequest = new AccessRestrictionRequest(httpRequest);
|
| | |
|
| | | String url = httpRequest.getRequestURI().substring(httpRequest.getServletPath().length());
|
| | | String servletUrl = httpRequest.getContextPath() + httpRequest.getServletPath();
|
| | | String url = httpRequest.getRequestURI().substring(servletUrl.length());
|
| | | String params = httpRequest.getQueryString();
|
| | | if (url.length() > 0 && url.charAt(0) == '/') {
|
| | | url = url.substring(1);
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | String hosturl = HttpUtils.getHostURL(request);
|
| | | String gitblitUrl = hosturl + request.getContextPath();
|
| | | GitBlit.self().submitFederationProposal(proposal, gitblitUrl);
|
| | | String url = HttpUtils.getGitblitURL(request);
|
| | | GitBlit.self().submitFederationProposal(proposal, url);
|
| | | logger.info(MessageFormat.format(
|
| | | "Submitted {0} federation proposal to pull {1} repositories from {2}",
|
| | | proposal.tokenType.name(), proposal.repositories.size(), proposal.url));
|
| | |
| | |
|
| | | Object result = null;
|
| | | if (FederationRequest.PULL_REPOSITORIES.equals(reqType)) {
|
| | | String gitblitUrl = HttpUtils.getHostURL(request);
|
| | | String gitblitUrl = HttpUtils.getGitblitURL(request);
|
| | | result = GitBlit.self().getRepositories(gitblitUrl, token);
|
| | | } else {
|
| | | if (FederationRequest.PULL_SETTINGS.equals(reqType)) {
|
| | |
| | | javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException,
|
| | | java.io.IOException {
|
| | |
|
| | | String hostURL = HttpUtils.getHostURL(request);
|
| | | String url = request.getRequestURI().substring(request.getServletPath().length());
|
| | | String servletUrl = request.getContextPath() + request.getServletPath();
|
| | | String url = request.getRequestURI().substring(servletUrl.length());
|
| | | if (url.charAt(0) == '/' && url.length() > 1) {
|
| | | url = url.substring(1);
|
| | | }
|
| | |
| | | RepositoryModel model = GitBlit.self().getRepositoryModel(repositoryName);
|
| | | List<RevCommit> commits = JGitUtils.getRevLog(repository, objectId, 0, length);
|
| | | try {
|
| | | SyndicationUtils.toRSS(hostURL, getTitle(model.name, objectId), model.description,
|
| | | SyndicationUtils.toRSS(HttpUtils.getGitblitURL(request), getTitle(model.name, objectId), model.description,
|
| | | model.name, commits, response.getOutputStream());
|
| | | } catch (Exception e) {
|
| | | logger.error("An error occurred during feed generation", e);
|
| | |
| | | public class HttpUtils {
|
| | |
|
| | | /**
|
| | | * Returns the host URL based on the request.
|
| | | * Returns the Gitblit URL based on the request.
|
| | | *
|
| | | * @param request
|
| | | * @return the host url
|
| | | */
|
| | | public static String getHostURL(HttpServletRequest request) {
|
| | | public static String getGitblitURL(HttpServletRequest request) {
|
| | | StringBuilder sb = new StringBuilder();
|
| | | sb.append(request.getScheme());
|
| | | sb.append("://");
|
| | |
| | | || (request.getScheme().equals("https") && request.getServerPort() != 443)) {
|
| | | sb.append(":" + request.getServerPort());
|
| | | }
|
| | | sb.append(request.getContextPath());
|
| | | return sb.toString();
|
| | | }
|
| | | }
|
| | |
| | | return new ContextRelativeResource(file);
|
| | | }
|
| | |
|
| | | public static String getHostURL(Request request) {
|
| | | public static String getGitblitURL(Request request) {
|
| | | HttpServletRequest req = ((WebRequest) request).getHttpServletRequest();
|
| | | return HttpUtils.getHostURL(req);
|
| | | return HttpUtils.getGitblitURL(req);
|
| | | }
|
| | |
|
| | | public static HeaderContributor syndicationDiscoveryLink(final String feedTitle,
|
| | |
| | | add(new LinkPanel("commitTree", "list", c.getTree().getName(), TreePage.class,
|
| | | newCommitParameter()));
|
| | | add(new BookmarkablePageLink<Void>("treeLink", TreePage.class, newCommitParameter()));
|
| | | add(new ExternalLink("zipLink", DownloadZipServlet.asLink(getRequest()
|
| | | .getRelativePathPrefixToContextRoot(), repositoryName, objectId, null))
|
| | | .setVisible(GitBlit.getBoolean(Keys.web.allowZipDownloads, true)));
|
| | | final String baseUrl = WicketUtils.getGitblitURL(getRequest());
|
| | | add(new ExternalLink("zipLink", DownloadZipServlet.asLink(baseUrl, repositoryName,
|
| | | objectId, null)).setVisible(GitBlit.getBoolean(Keys.web.allowZipDownloads, true)));
|
| | |
|
| | | // Parent Commits
|
| | | ListDataProvider<String> parentsDp = new ListDataProvider<String>(parents);
|
| | |
| | |
|
| | | final String token = WicketUtils.getToken(params);
|
| | |
|
| | | myUrl = WicketUtils.getHostURL(getRequest());
|
| | | myUrl = WicketUtils.getGitblitURL(getRequest());
|
| | | destinationUrl = "https://";
|
| | |
|
| | | // temporary proposal
|
| | |
| | | add(WicketUtils.newClearPixel("accessRestrictionIcon").setVisible(false));
|
| | | }
|
| | | StringBuilder sb = new StringBuilder();
|
| | | sb.append(WicketUtils.getHostURL(getRequestCycle().getRequest()));
|
| | | sb.append(WicketUtils.getGitblitURL(getRequestCycle().getRequest()));
|
| | | sb.append(Constants.GIT_PATH);
|
| | | sb.append(repositoryName);
|
| | | repositoryUrls.add(sb.toString());
|
| | |
| | |
|
| | | final ByteFormat byteFormat = new ByteFormat();
|
| | |
|
| | | final String baseUrl = WicketUtils.getGitblitURL(getRequest());
|
| | |
|
| | | // changed paths list
|
| | | ListDataProvider<PathModel> pathsDp = new ListDataProvider<PathModel>(paths);
|
| | | DataView<PathModel> pathsView = new DataView<PathModel>("changedPath", pathsDp) {
|
| | |
| | | links.add(new BookmarkablePageLink<Void>("history", HistoryPage.class,
|
| | | WicketUtils.newPathParameter(repositoryName, entry.commitId,
|
| | | entry.path)));
|
| | | links.add(new ExternalLink("zip", DownloadZipServlet.asLink(getRequest()
|
| | | .getRelativePathPrefixToContextRoot(), repositoryName, objectId,
|
| | | entry.path)).setVisible(GitBlit.getBoolean(
|
| | | Keys.web.allowZipDownloads, true)));
|
| | | links.add(new ExternalLink("zip", DownloadZipServlet.asLink(baseUrl,
|
| | | repositoryName, objectId, entry.path)).setVisible(GitBlit
|
| | | .getBoolean(Keys.web.allowZipDownloads, true)));
|
| | | item.add(links);
|
| | | } else {
|
| | | // blob link
|
| | |
| | | public FederationTokensPanel(String wicketId, final boolean showFederation) {
|
| | | super(wicketId);
|
| | |
|
| | | final String baseUrl = getRequest().getRelativePathPrefixToContextRoot();
|
| | | final String baseUrl = WicketUtils.getGitblitURL(getRequest());
|
| | | add(new ExternalLink("federatedUsers", FederationServlet.asFederationLink(baseUrl, GitBlit.self()
|
| | | .getFederationToken(FederationToken.USERS_AND_REPOSITORIES),
|
| | | FederationRequest.PULL_USERS)));
|
| | |
| | | dp = new SortableRepositoriesProvider(models);
|
| | | }
|
| | |
|
| | | final String baseUrl = WicketUtils.getGitblitURL(getRequest());
|
| | |
|
| | | DataView<RepositoryModel> dataView = new DataView<RepositoryModel>("row", dp) {
|
| | | private static final long serialVersionUID = 1L;
|
| | | int counter;
|
| | |
| | | } else {
|
| | | row.add(new Label("repositoryLinks"));
|
| | | }
|
| | | row.add(new ExternalLink("syndication", SyndicationServlet.asLink(getRequest()
|
| | | .getRelativePathPrefixToContextRoot(), entry.name, null, 0))
|
| | | .setVisible(linksActive));
|
| | | row.add(new ExternalLink("syndication", SyndicationServlet.asLink(baseUrl,
|
| | | entry.name, null, 0)).setVisible(linksActive));
|
| | | WicketUtils.setAlternatingBackground(item, counter);
|
| | | counter++;
|
| | | }
|