src/main/java/com/gitblit/utils/TicgitUtils.java
File was deleted src/main/java/com/gitblit/wicket/GitBlitWebApp.java
@@ -63,8 +63,6 @@ import com.gitblit.wicket.pages.SummaryPage; import com.gitblit.wicket.pages.TagPage; import com.gitblit.wicket.pages.TagsPage; import com.gitblit.wicket.pages.TicketPage; import com.gitblit.wicket.pages.TicketsPage; import com.gitblit.wicket.pages.TreePage; import com.gitblit.wicket.pages.UserPage; import com.gitblit.wicket.pages.UsersPage; @@ -72,9 +70,9 @@ public class GitBlitWebApp extends WebApplication { public final static Class<? extends BasePage> HOME_PAGE_CLASS = MyDashboardPage.class; private final Map<String, CacheControl> cacheablePages = new HashMap<String, CacheControl>(); @Override public void init() { super.init(); @@ -123,10 +121,6 @@ mount("/users", UsersPage.class); mount("/logout", LogoutPage.class); // setup ticket urls mount("/tickets", TicketsPage.class, "r"); mount("/ticket", TicketPage.class, "r", "f"); // setup the markdown urls mount("/docs", DocsPage.class, "r"); mount("/markdown", MarkdownPage.class, "r", "h", "f"); @@ -153,8 +147,8 @@ parameters = new String[] {}; } mount(new GitblitParamUrlCodingStrategy(location, clazz, parameters)); // map the mount point to the cache control definition // map the mount point to the cache control definition if (clazz.isAnnotationPresent(CacheControl.class)) { CacheControl cacheControl = clazz.getAnnotation(CacheControl.class); cacheablePages.put(location.substring(1), cacheControl); @@ -165,7 +159,7 @@ public Class<? extends Page> getHomePage() { return HOME_PAGE_CLASS; } public boolean isCacheablePage(String mountPoint) { return cacheablePages.containsKey(mountPoint); } src/main/java/com/gitblit/wicket/pages/RepositoryPage.java
@@ -63,7 +63,6 @@ import com.gitblit.utils.JGitUtils; import com.gitblit.utils.RefLogUtils; import com.gitblit.utils.StringUtils; import com.gitblit.utils.TicgitUtils; import com.gitblit.wicket.CacheControl; import com.gitblit.wicket.GitBlitWebSession; import com.gitblit.wicket.PageRegistration; @@ -75,25 +74,25 @@ import com.gitblit.wicket.panels.RefsPanel; public abstract class RepositoryPage extends RootPage { private final Logger logger = LoggerFactory.getLogger(getClass()); private final String PARAM_STAR = "star"; protected final String projectName; protected final String repositoryName; protected final String objectId; private transient Repository r; private RepositoryModel m; private Map<String, SubmoduleModel> submodules; private final Map<String, PageRegistration> registeredPages; private boolean showAdmin; private boolean isOwner; public RepositoryPage(PageParameters params) { super(params); repositoryName = WicketUtils.getRepositoryName(params); @@ -104,7 +103,7 @@ projectName = root; } objectId = WicketUtils.getObject(params); if (StringUtils.isEmpty(repositoryName)) { error(MessageFormat.format(getString("gb.repositoryNotSpecifiedFor"), getPageName()), true); } @@ -112,11 +111,11 @@ if (!getRepositoryModel().hasCommits) { setResponsePage(EmptyRepositoryPage.class, params); } if (getRepositoryModel().isCollectingGarbage) { error(MessageFormat.format(getString("gb.busyCollectingGarbage"), getRepositoryModel().name), true); } if (objectId != null) { RefModel branch = null; if ((branch = JGitUtils.getBranch(getRepository(), objectId)) != null) { @@ -132,7 +131,7 @@ } } } if (params.containsKey(PARAM_STAR)) { // set starred state boolean star = params.getBoolean(PARAM_STAR); @@ -168,7 +167,7 @@ // set stateless page preference setStatelessHint(true); } @Override protected Class<? extends BasePage> getRootNavPageClass() { return RepositoriesPage.class; @@ -177,7 +176,7 @@ protected Class<? extends BasePage> getRepoNavPageClass() { return getClass(); } private Map<String, PageRegistration> registerPages() { PageParameters params = null; if (!StringUtils.isEmpty(repositoryName)) { @@ -195,7 +194,7 @@ pages.put("summary", new PageRegistration("gb.summary", SummaryPage.class, params)); // pages.put("overview", new PageRegistration("gb.overview", OverviewPage.class, params)); pages.put("reflog", new PageRegistration("gb.reflog", ReflogPage.class, params)); } } pages.put("commits", new PageRegistration("gb.commits", LogPage.class, params)); pages.put("tree", new PageRegistration("gb.tree", TreePage.class, params)); pages.put("compare", new PageRegistration("gb.compare", ComparePage.class, params, true)); @@ -205,9 +204,6 @@ // conditional links // per-repository extra page links if (model.useTickets && TicgitUtils.getTicketsBranch(r) != null) { pages.put("tickets", new PageRegistration("gb.tickets", TicketsPage.class, params, true)); } if (model.showReadme || model.useDocs) { pages.put("docs", new PageRegistration("gb.docs", DocsPage.class, params, true)); } @@ -230,7 +226,7 @@ .getUsername())); return pages; } protected boolean allowForkControls() { return GitBlit.getBoolean(Keys.web.allowForking, true); } @@ -248,7 +244,7 @@ add(new LinkPanel("projectTitle", null, project.name, ProjectPage.class, WicketUtils.newProjectParameter(project.name))); } String name = StringUtils.stripDotGit(repositoryName); if (!StringUtils.isEmpty(projectName) && name.startsWith(projectName)) { name = name.substring(projectName.length() + 1); @@ -256,7 +252,7 @@ add(new LinkPanel("repositoryName", null, name, SummaryPage.class, WicketUtils.newRepositoryParameter(repositoryName))); add(new Label("pageName", pageName).setRenderBodyOnly(true)); UserModel user = GitBlitWebSession.get().getUser(); if (user == null) { user = UserModel.ANONYMOUS; @@ -279,12 +275,12 @@ } else { // link to origin repository Fragment forkFrag = new Fragment("originRepository", "originFragment", this); forkFrag.add(new LinkPanel("originRepository", null, StringUtils.stripDotGit(model.originRepository), forkFrag.add(new LinkPanel("originRepository", null, StringUtils.stripDotGit(model.originRepository), SummaryPage.class, WicketUtils.newRepositoryParameter(model.originRepository))); add(forkFrag); } } // (un)star link allows a user to star a repository if (user.isAuthenticated) { PageParameters starParams = DeepCopier.copy(getPageParameters()); @@ -318,7 +314,7 @@ if (hasFork || !canFork) { // user not allowed to fork or fork already exists or repo forbids forking add(new ExternalLink("forkLink", "").setVisible(false)); if (hasFork && !fork.equals(model.name)) { // user has fork, view my fork link String url = getRequestCycle().urlFor(SummaryPage.class, WicketUtils.newRepositoryParameter(fork)).toString(); @@ -334,17 +330,17 @@ add(new ExternalLink("forkLink", url)); } } if (showAdmin || isOwner) { String url = getRequestCycle().urlFor(EditRepositoryPage.class, WicketUtils.newRepositoryParameter(model.name)).toString(); add(new ExternalLink("editLink", url)); add(new ExternalLink("editLink", url)); } else { add(new Label("editLink").setVisible(false)); } super.setupPage(repositoryName, pageName); } protected void addToolbarButton(String wicketId, String iconClass, String label, String url) { Fragment button = new Fragment(wicketId, "toolbarLinkFragment", this); Label icon = new Label("icon"); @@ -402,8 +398,8 @@ getSubmodules(commit); return commit; } protected Map<String, SubmoduleModel> getSubmodules(RevCommit commit) { protected Map<String, SubmoduleModel> getSubmodules(RevCommit commit) { if (submodules == null) { submodules = new HashMap<String, SubmoduleModel>(); for (SubmoduleModel model : JGitUtils.getSubmodules(r, commit.getTree())) { @@ -412,7 +408,7 @@ } return submodules; } protected SubmoduleModel getSubmodule(String path) { SubmoduleModel model = null; if (submodules != null) { @@ -428,7 +424,7 @@ // extract the repository name from the clone url List<String> patterns = GitBlit.getStrings(Keys.git.submoduleUrlPatterns); String submoduleName = StringUtils.extractRepositoryPath(model.url, patterns.toArray(new String[0])); // determine the current path for constructing paths relative // to the current repository String currentPath = ""; @@ -471,11 +467,11 @@ return model; } } // we do not have a copy of the submodule, but we need a path model.gitblitPath = candidates.get(0); return model; } } } protected String getShortObjectId(String objectId) { @@ -574,7 +570,7 @@ setupPage(repositoryName, "/ " + getPageName()); super.onBeforeRender(); } @Override protected void setLastModified() { if (getClass().isAnnotationPresent(CacheControl.class)) { @@ -614,11 +610,11 @@ public boolean isShowAdmin() { return showAdmin; } public boolean isOwner() { return isOwner; } private class SearchForm extends SessionlessForm<Void> implements Serializable { private static final long serialVersionUID = 1L; @@ -652,7 +648,7 @@ Constants.SearchType searchType = searchTypeModel.getObject(); String searchString = searchBoxModel.getObject(); if (StringUtils.isEmpty(searchString)) { // redirect to self to avoid wicket page update bug // redirect to self to avoid wicket page update bug PageParameters params = RepositoryPage.this.getPageParameters(); String relativeUrl = urlFor(RepositoryPage.this.getClass(), params).toString(); String absoluteUrl = RequestUtils.toAbsolutePath(relativeUrl); src/main/java/com/gitblit/wicket/pages/TicketPage.html
File was deleted src/main/java/com/gitblit/wicket/pages/TicketPage.java
File was deleted src/main/java/com/gitblit/wicket/pages/TicketsPage.html
File was deleted src/main/java/com/gitblit/wicket/pages/TicketsPage.java
File was deleted src/main/java/com/gitblit/wicket/panels/ProjectRepositoryPanel.html
@@ -42,9 +42,6 @@ <img class="inlineIcon" wicket:id="frozenIcon" /> <img class="inlineIcon" wicket:id="federatedIcon" /> <a style="text-decoration: none;" wicket:id="tickets" wicket:message="title:gb.tickets"> <img style="border:0px;vertical-align:middle;" src="bug_16x16.png"></img> </a> <a style="text-decoration: none;" wicket:id="docs" wicket:message="title:gb.docs"> <img style="border:0px;vertical-align:middle;" src="book_16x16.png"></img> </a> src/main/java/com/gitblit/wicket/panels/ProjectRepositoryPanel.java
@@ -41,7 +41,6 @@ import com.gitblit.wicket.pages.EditRepositoryPage; import com.gitblit.wicket.pages.LogPage; import com.gitblit.wicket.pages.SummaryPage; import com.gitblit.wicket.pages.TicketsPage; import com.gitblit.wicket.pages.TreePage; public class ProjectRepositoryPanel extends BasePanel { @@ -78,7 +77,7 @@ add(new Label("originRepository").setVisible(false)); } else { Fragment forkFrag = new Fragment("originRepository", "originFragment", this); forkFrag.add(new LinkPanel("originRepository", null, StringUtils.stripDotGit(entry.originRepository), forkFrag.add(new LinkPanel("originRepository", null, StringUtils.stripDotGit(entry.originRepository), SummaryPage.class, WicketUtils.newRepositoryParameter(entry.originRepository))); add(forkFrag); } @@ -89,7 +88,6 @@ add(WicketUtils.newClearPixel("sparkleshareIcon").setVisible(false)); } add(new BookmarkablePageLink<Void>("tickets", TicketsPage.class, pp).setVisible(entry.useTickets)); add(new BookmarkablePageLink<Void>("docs", DocsPage.class, pp).setVisible(entry.useDocs)); if (entry.isFrozen) { @@ -110,10 +108,10 @@ String owner = ""; for (String username : entry.owners) { UserModel ownerModel = GitBlit.self().getUserModel(username); if (ownerModel != null) { owner = ownerModel.getDisplayName(); } } } if (entry.owners.size() > 1) { owner += ", ..."; src/site/features.mkd
@@ -55,9 +55,8 @@ - Syntax highlighting for popular source code types - Customizable regular expression substitution for commit messages (i.e. bug or code review link integration) - Single text file for users configuration - Optional utility pages -  Docs page which enumerates all Markdown files within a repository -  **readonly and deprecated** Ticgit ticket pages *(based on last MIT release bf57b032 2009-01-27)* - Optional Docs page which enumerates all Markdown files within a repository 2009-01-27)* - Translations - English - Japanese src/test/java/com/gitblit/tests/GitBlitSuite.java
@@ -43,21 +43,21 @@ * The GitBlitSuite uses test-gitblit.properties and test-users.conf. The suite * is fairly comprehensive for all lower-level functionality. Wicket pages are * currently not unit-tested. * * * This suite starts a Gitblit server instance within the same JVM instance as * the unit tests. This allows the unit tests to access the GitBlit static * singleton while also being able to communicate with the instance via tcp/ip * for testing rpc requests, federation requests, and git servlet operations. * * * @author James Moger * * */ @RunWith(Suite.class) @SuiteClasses({ ArrayUtilsTest.class, FileUtilsTest.class, TimeUtilsTest.class, StringUtilsTest.class, Base64Test.class, JsonUtilsTest.class, ByteFormatTest.class, ObjectCacheTest.class, PermissionsTest.class, UserServiceTest.class, LdapUserServiceTest.class, MarkdownUtilsTest.class, JGitUtilsTest.class, SyndicationUtilsTest.class, DiffUtilsTest.class, MetricUtilsTest.class, TicgitUtilsTest.class, X509UtilsTest.class, DiffUtilsTest.class, MetricUtilsTest.class, X509UtilsTest.class, GitBlitTest.class, FederationTests.class, RpcTests.class, GitServletTest.class, GitDaemonTest.class, GroovyScriptTest.class, LuceneExecutorTest.class, IssuesTest.class, RepositoryModelTest.class, FanoutServiceTest.class, Issue0259Test.class, Issue0271Test.class, HtpasswdUserServiceTest.class, @@ -65,9 +65,9 @@ public class GitBlitSuite { public static final File REPOSITORIES = new File("data/git"); public static final File SETTINGS = new File("src/test/config/test-gitblit.properties"); public static final File USERSCONF = new File("src/test/config/test-users.conf"); static int port = 8280; @@ -102,11 +102,11 @@ JGitUtils.createRepository(REPOSITORIES, "gb-issues.git").close(); return getRepository("gb-issues.git"); } public static Repository getGitectiveRepository() throws Exception { return getRepository("test/gitective.git"); } private static Repository getRepository(String name) throws Exception { File gitDir = FileKey.resolve(new File(REPOSITORIES, name), FS.DETECTED); Repository repository = new FileRepositoryBuilder().setGitDir(gitDir).build(); @@ -118,11 +118,12 @@ // already started return false; } GitServletTest.deleteWorkingFolders(); // Start a Gitblit instance Executors.newSingleThreadExecutor().execute(new Runnable() { @Override public void run() { GitBlitServer.main("--httpPort", "" + port, "--httpsPort", "0", "--shutdownPort", "" + shutdownPort, "--gitPort", "" + gitPort, "--repositoriesFolder", @@ -158,13 +159,13 @@ cloneOrFetch("test/helloworld.git", "https://github.com/git/hello-world.git"); cloneOrFetch("test/ambition.git", "https://github.com/defunkt/ambition.git"); cloneOrFetch("test/gitective.git", "https://github.com/kevinsawicki/gitective.git"); enableTickets("ticgit.git"); enableDocs("ticgit.git"); showRemoteBranches("ticgit.git"); automaticallyTagBranchTips("ticgit.git"); showRemoteBranches("test/jgit.git"); automaticallyTagBranchTips("test/jgit.git"); automaticallyTagBranchTips("test/jgit.git"); } } @@ -212,7 +213,7 @@ g.printStackTrace(); } } private static void automaticallyTagBranchTips(String repositoryName) { try { RepositoryModel model = GitBlit.self().getRepositoryModel(repositoryName); @@ -222,7 +223,7 @@ g.printStackTrace(); } } public static void close(File repository) { try { File gitDir = FileKey.resolve(repository, FS.detect()); @@ -233,11 +234,11 @@ e.printStackTrace(); } } public static void close(Git git) { close(git.getRepository()); } public static void close(Repository r) { RepositoryCache.close(r); src/test/java/com/gitblit/tests/TicgitUtilsTest.java
File was deleted