Added support for displaying refs/pull/n/head|merge
| | |
| | |
|
| | | private static final String R_CHANGES = "refs/changes/";
|
| | |
|
| | | private static final String R_PULL= "refs/pull/";
|
| | |
|
| | | public RefsPanel(String id, final String repositoryName, RevCommit c,
|
| | | Map<ObjectId, List<RefModel>> refs) {
|
| | | this(id, repositoryName, refs.get(c.getId()));
|
| | |
| | | // Gerrit change ref
|
| | | name = name.substring(R_CHANGES.length());
|
| | | cssClass = "otherRef";
|
| | | } else if (name.startsWith(R_PULL)) {
|
| | | // Pull Request ref
|
| | | name = "pull #" + name.substring(R_PULL.length());
|
| | | if (name.endsWith("/head")) {
|
| | | // strip pull request head from name |
| | | name = name.substring(0, name.length() - "/head".length());
|
| | | }
|
| | | cssClass = "pullRef";
|
| | | } else if (name.startsWith(Constants.R_REMOTES)) {
|
| | | // remote branch
|
| | | linkClass = LogPage.class;
|
| | |
| | | font-size: 2em;
|
| | | }
|
| | |
|
| | | .tagRef, .headRef, .localBranch, .remoteBranch, .otherRef { |
| | | .tagRef, .headRef, .localBranch, .remoteBranch, .otherRef, .pullRef { |
| | | padding: 0px 3px;
|
| | | margin-right:2px;
|
| | | font-family: sans-serif;
|
| | |
| | | color: black;
|
| | | }
|
| | |
|
| | | .tagRef a, .headRef a, .localBranch a, .remoteBranch a, .otherRef a {
|
| | | .tagRef a, .headRef a, .localBranch a, .remoteBranch a, .otherRef a, .pullRef a {
|
| | | font-size: 9px;
|
| | | text-decoration: none;
|
| | | color: black !important;
|
| | | }
|
| | |
|
| | | .tagRef a:hover, .headRef a:hover, .localBranch a:hover, .remoteBranch a:hover, .otherRef a:hover {
|
| | | .tagRef a:hover, .headRef a:hover, .localBranch a:hover, .remoteBranch a:hover, .otherRef a:hover, .pullRef a:hover {
|
| | | color: black !important;
|
| | | text-decoration: underline;
|
| | | }
|
| | |
| | | border-color: #80aaaa;
|
| | | }
|
| | |
|
| | | .pullRef {
|
| | | background-color: rgb(255, 221, 136);
|
| | | border-color: rgb(136, 136, 136);
|
| | | }
|
| | |
|
| | | .remoteBranch {
|
| | | background-color: #cAc2f5;
|
| | | border-color: #6c6cbf;
|