6,566
edits
(GitLab URL fix for 'type = git'.) |
(Modified the Gitorious URL generation so that if no project or repository is given, then just the base URL https://gitorious.org is created.) |
||
Line 318: | Line 318: | ||
| gitorious = <!-- | | gitorious = <!-- | ||
-->{{{protocol|https}}}://<!-- URL protocol (default = https). | -->{{{protocol|https}}}://<!-- URL protocol (default = https). | ||
-->gitorious.org | -->gitorious.org<!-- The URL (stop here if no project or repository is given). | ||
-->{{{proj| | -->{{#if: {{{proj|}}} | {{#if: {{{repo|}}} | ||
-->{{{repo| | | {{#if: {{{proj|}}} | /{{{proj}}}}}<!-- The project. | ||
-->{{#switch: {{{type|git web}}} <!-- | -->{{#if: {{{repo|}}} | /{{{repo}}}}}<!-- The version control repository. | ||
-->{{#switch: {{{type|git web}}} <!-- Web interface or base URL. --> | |||
| git = .git<!-- Append '.git' to the base repository URL. --> | |||
| git web = ?<!-- | |||
-->p={{{proj|fg}}}<!-- The project and repository names, with '.git' appended. | |||
-->:{{{repo|flightgear}}}<!-- | |||
-->.git<!-- | |||
-->;a={{#if: {{{view|}}} <!-- The repository view mode. --> | |||
| {{#switch: {{{view|}}} | |||
| raw = blob_plain | |||
| #default = {{{view|summary}}} | |||
}} | |||
| {{#if: {{{path|}}} | blob | |||
| {{#if: {{{commit|{{{mr|}}}}}} | |||
| commit | |||
| {{#if: {{{branch|{{{tag|}}}}}} | |||
| shortlog | |||
| summary | |||
}} | |||
}} | |||
}} | |||
}}<!-- | |||
-->{{#if: {{{path|}}} | ;f={{{path|}}}}}<!-- The file or directory path. | |||
-->{{#if: {{{commit|{{{branch|{{{mr|}}}}}}}}} <!-- The commit, branch, or merge request query string. --> | |||
| {{#if: {{{view|}}} | |||
| {{#switch: {{{view|}}} | |||
| blob | raw | tree = ;hb= | |||
| #default = ;h= | |||
}} | |||
| {{#if: {{{path|}}} | |||
| ;hb= | |||
| ;h= | |||
}} | |||
}} | |||
}}<!-- | |||
-->{{#if: {{{mr|}}} | |||
| refs/merge-requests/{{{mr}}} <!-- The internal git reference for the merge request. --> | |||
| {{#if: {{{commit|}}} | |||
| {{{commit}}} <!-- The commit hash. --> | |||
| {{#if: {{{branch|}}}<!-- The internal git reference for the branch. --> | |||
| refs/heads/{{{branch}}} | |||
}} | |||
}} | |||
}}<!-- | |||
-->{{#if: {{{line|}}} |#l{{{line}}}}} <!-- The optional line number. --> | |||
}} | |||
}}}} <!-- | |||
-->{{#if: {{{text|}}} | |||
| {{{text}}}<!-- The text description for the link. --> | |||
| {{#ifeq: {{{full|}}} | 1 | |||
| <!-- No text. --> | |||
| {{#if: {{{pre|}}} | |||
| {{{pre}}}<!-- A prefix to the link label. --> | |||
| {{#if: {{{simplepath|}}} | |||
| <!-- No project, repository or branch. --> | |||
| {{{proj|fg}}}/<!-- The project name. | |||
-->{{{repo|flightgear}}}/<!-- The repository name. | |||
-->{{#if: {{{mr|}}} | |||
| merge-requests/{{{mr}}}<!-- The merge request.--> | |||
| {{{commit|{{{branch|HEAD}}}}}}<!-- Or the commit or branch.--> | |||
}} | |||
}} | |||
}}<!-- | |||
-->{{#if: {{{path|}}} | /{{{path}}}}}<!-- The file or directory path. | |||
-->{{#if: {{{line|}}} | #l{{{line}}}}} <!-- The optional line number. --> | |||
}} | |||
}} | }} | ||
| #default = <!-- | | #default = <!-- |