Template:Hg releases

From MozillaWiki
(Redirected from Template:Hgreleases)
Jump to: navigation, search

Mercurial release repositories

Documentation icon Template documentation[view] [edit] [history] [purge]

Usage

Shortcuts
{{hgrel}}
{{hgreleases}}

{{hgrel}} creates a link to a revision on the /releases branch in Mercurial (hg.mozilla.org/releases/…), with the options to choose which repository to link to, and to add a custom link text.

Parameters

There are 3 parameters, all named and optional.

However, you can't link to any revision without also specifying the repository it belongs to. That means the parameter |rev is dependant on the parameter |repo, which makes the latter optional only if the revision id is left out.

Syntax

The template's syntax is

  • {{hgrel|repo=repository name |rev=revision id |text=custom link text }}

Optional parameters

repo

Repository under /releases

Specify the repository you wish to link to, by using this parameter. The name must be written exactly as shown in the list of repositories under /releases.

Notes
  • This parameter is required if you you want to link to a revision, and you specify its id using the parameter |rev.
  • If this parameter is used, but |rev is left out, the template will use the repository's name as link text. You can override this by specifying a custom link text, using the parameter |text.
  • If |repo is left out, the template will output a link to the repositories list above, with the default link text "Mercurial release repositories" or your costum link text.
Usage
  • {{hgrel|repo=repository name}}

rev

Revision id

Enter the alphanumeric Mercurial revision id for the revision you wish to link to.

Notes
  • The parameter |repo is required if you you want to use this parameter to link to a specific revision. If it is missing, the template will output a link to a list of the repositories under /releases, with the default link text "Mercurial release repositories" or your costum link text.
  • If this parameter is used correctly, i.e. together with |repo, the template will use the revision's id as link text. You can override this by specifying a custom link text, using the parameter |text.
Usage
  • {{hgrel|rev=revision id}}

text

Custom link text

You can specify a custom link text for your link.

Usage
  • {{hgrel|text=custom link text}}

Examples

Correct use

Case What you type What you see Comments
No parameters {{hgrel}} Mercurial release repositories Links to the /releases repository list in Mercurial.
repo repo=comm-beta}} comm-beta
repo and |rev repo=comm-beta|rev=baea280adc1c}} baea280adc1c
Custom text text=Index indiciorum thesauri in ramo Mercurialis "releases"}} Index indiciorum thesauri in ramo Mercurialis "releases"
repo=comm-beta|rev=baea280adc1c|text=Follow-up to bug 999524}} Follow-up to bug 999524

Incorrect use

Case What you type What you see Comments
rev specified,
|repo missing
rev=baea280adc1c}} Mercurial release repositories Falls back to linking to the /releases repository list in Mercurial.

See also

  • {{c-c}}: links to a revision in the comm-central tree in Mercurial.
  • {{hg}}: links to a revision in the mozilla-central tree in Mercurial, with options to alter the link target.
  • {{m-c}}: links to a revision in the mozilla-central tree in Mercurial.
  • {{rev}}: links to a revision in a custom repository in Mercurial.
  • {{source}}: links to source code in the mozilla-central Mercurial tree, via the Mozilla France service in Mozilla Cross-Reference (MXR).
  • {{SVN}}: links to a revision in Mozilla's source code browsing website for SVN.