Template:Rev/doc: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(Corr.)
Line 11: Line 11:
* {{tlc|rev|''revision id''|''optional Mercurial repository''}}
* {{tlc|rev|''revision id''|''optional Mercurial repository''}}


===Required parameter===
===Required parameters===
====1====
====1====
;<big>Revision id</big>
;<big>Revision id</big>

Revision as of 16:22, 7 December 2014

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|revision id|optional Mercurial repository}}

Required parameters

1

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.

Usage
  • {{rev|revision id}}

2

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.

Note
  • This parameter must be placed after the 1st parameter.
  • The input for this parameter also functions as the link text.
Usage
  • {{rev|1|Mercurial repository}}

Examples

Correct use

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

Incorrect use

Case What you type What you see Notes
No/empty 2nd parameter {{rev|93c3fee6ec69}} {{{2}}} Broken link

See also

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