tests/test-keyword.out
changeset 9066 11b111e9acd3
parent 8957 7672d8e13d0d
child 9106 7705d184faa1
equal deleted inserted replaced
9065:90e16c251246 9066:11b111e9acd3
     1 % help
     1 % help
     2 keyword extension - expand keywords in tracked files
     2 keyword extension - expand keywords in tracked files
     3 
     3 
     4 This extension expands RCS/CVS-like or self-customized $Keywords$ in
     4 This extension expands RCS/CVS-like or self-customized $Keywords$ in tracked
     5 tracked text files selected by your configuration.
     5 text files selected by your configuration.
     6 
     6 
     7 Keywords are only expanded in local repositories and not stored in the
     7 Keywords are only expanded in local repositories and not stored in the change
     8 change history. The mechanism can be regarded as a convenience for the
     8 history. The mechanism can be regarded as a convenience for the current user
     9 current user or for archive distribution.
     9 or for archive distribution.
    10 
    10 
    11 Configuration is done in the [keyword] and [keywordmaps] sections of
    11 Configuration is done in the [keyword] and [keywordmaps] sections of hgrc
    12 hgrc files.
    12 files.
    13 
    13 
    14 Example:
    14 Example:
    15 
    15 
    16     [keyword]
    16     [keyword]
    17     # expand keywords in every python file except those matching "x*"
    17     # expand keywords in every python file except those matching "x*"
    18     **.py =
    18     **.py =
    19     x*    = ignore
    19     x*    = ignore
    20 
    20 
    21 Note: the more specific you are in your filename patterns
    21 Note: the more specific you are in your filename patterns the less you lose
    22       the less you lose speed in huge repositories.
    22       speed in huge repositories.
    23 
    23 
    24 For [keywordmaps] template mapping and expansion demonstration and
    24 For [keywordmaps] template mapping and expansion demonstration and control run
    25 control run "hg kwdemo".
    25 "hg kwdemo".
    26 
    26 
    27 An additional date template filter {date|utcdate} is provided.
    27 An additional date template filter {date|utcdate} is provided.
    28 
    28 
    29 The default template mappings (view with "hg kwdemo -d") can be
    29 The default template mappings (view with "hg kwdemo -d") can be replaced with
    30 replaced with customized keywords and templates. Again, run "hg
    30 customized keywords and templates. Again, run "hg kwdemo" to control the
    31 kwdemo" to control the results of your config changes.
    31 results of your config changes.
    32 
    32 
    33 Before changing/disabling active keywords, run "hg kwshrink" to avoid
    33 Before changing/disabling active keywords, run "hg kwshrink" to avoid the risk
    34 the risk of inadvertently storing expanded keywords in the change
    34 of inadvertently storing expanded keywords in the change history.
    35 history.
    35 
    36 
    36 To force expansion after enabling it, or a configuration change, run "hg
    37 To force expansion after enabling it, or a configuration change, run
    37 kwexpand".
    38 "hg kwexpand".
    38 
    39 
    39 Also, when committing with the record extension or using mq's qrecord, be
    40 Also, when committing with the record extension or using mq's qrecord,
    40 aware that keywords cannot be updated. Again, run "hg kwexpand" on the files
    41 be aware that keywords cannot be updated. Again, run "hg kwexpand" on
    41 in question to update keyword expansions after all changes have been checked
    42 the files in question to update keyword expansions after all changes
    42 in.
    43 have been checked in.
    43 
    44 
    44 Expansions spanning more than one line and incremental expansions, like CVS'
    45 Expansions spanning more than one line and incremental expansions,
    45 $Log$, are not supported. A keyword template map "Log = {desc}" expands to the
    46 like CVS' $Log$, are not supported. A keyword template map
    46 first line of the changeset description.
    47 "Log = {desc}" expands to the first line of the changeset description.
       
    48 
    47 
    49 list of commands:
    48 list of commands:
    50 
    49 
    51  kwdemo     print [keywordmaps] configuration and an expansion example
    50  kwdemo     print [keywordmaps] configuration and an expansion example
    52  kwexpand   expand keywords in the working directory
    51  kwexpand   expand keywords in the working directory