Template:Rev/doc

From MozillaWiki
Jump to: navigation, search
Edit-copy green.svg
This is a documentation subpage for Template:Rev.
It contains usage information, categories and other content that is not part of the original template page.

Usage

{{rev}} creates a link to a revision on Mercurial. It works similar to {{hg}}, but have no default repository to fall back upon.

Parameters

There are 2 parameters, both unnamed and both required.

Syntax

The template's syntax is

  • {{rev|Mercurial repository |revision id }}

Required parameters

1

Mercurial repository

The Mercurial repository, in which the revision you want to link to is registered (e.g. mozilla-central). The parameter is unnamed, so no parameter name needs to be specified.

Notes
  • This parameter must be placed before the 2nd parameter.
Usage
  • {{rev|1|2}}

2

Revision id

The alphanumeric Mercurial revision id for the revision you wish to link to. The parameter is unnamed, so no parameter name needs to be specified.

Notes
  • This parameter must be placed before the 1st parameter.
  • The input for this parameter also functions as the link text.
Usage
  • {{rev|1|2}}

Examples

Correct use

Case What you type What you see
Mercurial repository comm-central|ba0c4f045733}} ba0c4f045733

Incorrect use

Case What you type What you see Notes
No/empty 1st parameter 93c3fee6ec69}} {{{2}}} Broken link
No/empty 2nd parameter comm-central}} {{{2}}} Broken link

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.
  • {{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.