Pike v8.1 release 6

Method Parser.RCS()->expand_keywords_for_revision()


Method expand_keywords_for_revision

string expand_keywords_for_revision(string|Revision rev, string|void text, int|void expansion_mode)

Description

Expand keywords and return the resulting text according to the expansion rules set for the file.

Parameter rev

The revision to apply the expansion for.

Parameter text

If supplied, substitute keywords for that text instead using values that would apply for the given revision. Otherwise, revision rev is used.

Parameter expansion_mode

Expansion mode

1

Perform expansion even if the file was checked in as binary.

0

Perform expansion only if the file was checked in as non-binary with expansion enabled.

-1

Perform contraction if the file was checked in as non-binary.

Note

The Log keyword (which lacks sane quoting rules) is not expanded. Keyword expansion rules set in CVSROOT/cvswrappers are ignored. Only implements the -kkv, -ko and -kb expansion modes.

Note

Does not perform any line-ending conversion.

See also

get_contents_for_revision