| | |
| | | import org.eclipse.jgit.revplot.PlotWalk;
|
| | | import org.eclipse.jgit.revwalk.RevCommit;
|
| | |
|
| | | import com.gitblit.manager.IRepositoryManager;
|
| | | import com.gitblit.manager.IRuntimeManager;
|
| | | import com.gitblit.utils.JGitUtils;
|
| | | import com.gitblit.utils.StringUtils;
|
| | |
|
| | |
| | | protected long getLastModified(HttpServletRequest req) {
|
| | | String repository = req.getParameter("r");
|
| | | String objectId = req.getParameter("h");
|
| | | IRepositoryManager repositoryManager = GitBlit.getManager(IRepositoryManager.class);
|
| | | Repository r = null;
|
| | | try {
|
| | | r = GitBlit.self().getRepository(repository);
|
| | | r = repositoryManager.getRepository(repository);
|
| | | if (StringUtils.isEmpty(objectId)) {
|
| | | objectId = JGitUtils.getHEADRef(r);
|
| | | }
|
| | |
| | | String objectId = request.getParameter("h");
|
| | | String length = request.getParameter("l");
|
| | |
|
| | | r = GitBlit.self().getRepository(repository);
|
| | | IStoredSettings settings = GitBlit.getManager(IRuntimeManager.class).getSettings();
|
| | | IRepositoryManager repositoryManager = GitBlit.getManager(IRepositoryManager.class);
|
| | |
|
| | | r = repositoryManager.getRepository(repository);
|
| | |
|
| | | rw = new PlotWalk(r);
|
| | | if (StringUtils.isEmpty(objectId)) {
|
| | |
| | | rw.markStart(rw.lookupCommit(r.resolve(objectId)));
|
| | |
|
| | | // default to the items-per-page setting, unless specified
|
| | | int maxCommits = GitBlit.getInteger(Keys.web.itemsPerPage, 50);
|
| | | int maxCommits = settings.getInteger(Keys.web.itemsPerPage, 50);
|
| | | int requestedCommits = maxCommits;
|
| | | if (!StringUtils.isEmpty(length)) {
|
| | | int l = Integer.parseInt(length);
|