hgkw/keyword.py
changeset 733 67708fe93c99
parent 732 0ff5881bc04b
child 735 cbb80aee425c
equal deleted inserted replaced
731:a61028bb0c8e 733:67708fe93c99
    47 
    47 
    48 NOTE: the more specific you are in your filename patterns the less you
    48 NOTE: the more specific you are in your filename patterns the less you
    49 lose speed in huge repositories.
    49 lose speed in huge repositories.
    50 
    50 
    51 For [keywordmaps] template mapping and expansion demonstration and
    51 For [keywordmaps] template mapping and expansion demonstration and
    52 control run "hg kwdemo". See "hg help templates" for a list of
    52 control run :hg:`kwdemo`. See :hg:`help templates` for a list of
    53 available templates and filters.
    53 available templates and filters.
    54 
    54 
    55 An additional date template filter {date|utcdate} is provided. It
    55 An additional date template filter {date|utcdate} is provided. It
    56 returns a date like "2006/09/18 15:13:13".
    56 returns a date like "2006/09/18 15:13:13".
    57 
    57 
    58 The default template mappings (view with "hg kwdemo -d") can be
    58 The default template mappings (view with :hg:`kwdemo -d`) can be
    59 replaced with customized keywords and templates. Again, run "hg
    59 replaced with customized keywords and templates. Again, run
    60 kwdemo" to control the results of your config changes.
    60 :hg:`kwdemo` to control the results of your config changes.
    61 
    61 
    62 Before changing/disabling active keywords, run "hg kwshrink" to avoid
    62 Before changing/disabling active keywords, run :hg:`kwshrink` to avoid
    63 the risk of inadvertently storing expanded keywords in the change
    63 the risk of inadvertently storing expanded keywords in the change
    64 history.
    64 history.
    65 
    65 
    66 To force expansion after enabling it, or a configuration change, run
    66 To force expansion after enabling it, or a configuration change, run
    67 "hg kwexpand".
    67 :hg:`kwexpand`.
    68 
    68 
    69 Also, when committing with the record extension or using mq's qrecord,
    69 Also, when committing with the record extension or using mq's qrecord,
    70 be aware that keywords cannot be updated. Again, run "hg kwexpand" on
    70 be aware that keywords cannot be updated. Again, run :hg:`kwexpand` on
    71 the files in question to update keyword expansions after all changes
    71 the files in question to update keyword expansions after all changes
    72 have been checked in.
    72 have been checked in.
    73 
    73 
    74 Expansions spanning more than one line and incremental expansions,
    74 Expansions spanning more than one line and incremental expansions,
    75 like CVS' $Log$, are not supported. A keyword template map "Log =
    75 like CVS' $Log$, are not supported. A keyword template map "Log =
   359 
   359 
   360     Useful to prevent inadvertent keyword expansion and to speed up
   360     Useful to prevent inadvertent keyword expansion and to speed up
   361     execution by including only files that are actual candidates for
   361     execution by including only files that are actual candidates for
   362     expansion.
   362     expansion.
   363 
   363 
   364     See "hg help keyword" on how to construct patterns both for
   364     See :hg:`help keyword` on how to construct patterns both for
   365     inclusion and exclusion of files.
   365     inclusion and exclusion of files.
   366 
   366 
   367     With -A/--all and -v/--verbose the codes used to show the status
   367     With -A/--all and -v/--verbose the codes used to show the status
   368     of files are::
   368     of files are::
   369 
   369 
   396 
   396 
   397 def shrink(ui, repo, *pats, **opts):
   397 def shrink(ui, repo, *pats, **opts):
   398     '''revert expanded keywords in the working directory
   398     '''revert expanded keywords in the working directory
   399 
   399 
   400     Run before changing/disabling active keywords or if you experience
   400     Run before changing/disabling active keywords or if you experience
   401     problems with "hg import" or "hg merge".
   401     problems with :hg:`import` or :hg:`merge`.
   402 
   402 
   403     kwshrink refuses to run if given files contain local changes.
   403     kwshrink refuses to run if given files contain local changes.
   404     '''
   404     '''
   405     # 3rd argument sets expansion to False
   405     # 3rd argument sets expansion to False
   406     _kwfwrite(ui, repo, False, *pats, **opts)
   406     _kwfwrite(ui, repo, False, *pats, **opts)