|
1 % help |
|
2 keyword extension - keyword expansion in local repositories |
|
3 |
|
4 This extension expands RCS/CVS-like or self-customized keywords in |
|
5 the text files selected by your configuration. |
|
6 |
|
7 Keywords are only expanded in local repositories and not logged by |
|
8 Mercurial internally. The mechanism can be regarded as a convenience |
|
9 for the current user and may be turned off anytime. |
|
10 |
|
11 Substitution takes place on every commit and update of the working |
|
12 repository. |
|
13 |
|
14 Configuration is done in the [keyword] and [keywordmaps] sections of |
|
15 hgrc files. |
|
16 |
|
17 no commands defined |
|
18 % cat |
|
19 $Id$ |
|
20 $Id$ |
|
21 % default keyword expansion |
|
22 % commit |
|
23 adding a |
|
24 adding b |
|
25 a |
|
26 b |
|
27 calling hook pretxncommit.keyword: hgext.keyword.pretxnkw |
|
28 overwriting a expanding keywords |
|
29 % cat |
|
30 $Id: a,v b803250b3164 1970/01/01 00:00:00 user $ |
|
31 $Id$ |
|
32 % hg cat |
|
33 $Id: a,v b803250b3164 1970/01/01 00:00:00 user $ |
|
34 $Id$ |
|
35 % update |
|
36 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
37 % cat |
|
38 $Id: a,v b803250b3164 1970/01/01 00:00:00 user $ |
|
39 $Id$ |
|
40 % custom keyword expansion |
|
41 % cat |
|
42 $Id: a,v b803250b3164 1970/01/01 00:00:00 user $ |
|
43 $Id$ |
|
44 % hg cat |
|
45 $Id: a b803250b3164 Thu, 01 Jan 1970 00:00:00 +0000 user $ |
|
46 $Id$ |
|
47 % commit |
|
48 a |
|
49 calling hook pretxncommit.keyword: hgext.keyword.pretxnkw |
|
50 overwriting a expanding keywords |
|
51 % cat |
|
52 $Id: a 375046bad9d3 Thu, 01 Jan 1970 00:00:01 +0000 user $ |
|
53 $Xinfo: User Name <user@example.com>: firstline $ |
|
54 $Id$ |
|
55 % hg cat |
|
56 $Id: a 375046bad9d3 Thu, 01 Jan 1970 00:00:01 +0000 user $ |
|
57 $Xinfo: User Name <user@example.com>: firstline $ |
|
58 $Id$ |
|
59 % switch off expansion |
|
60 % cat |
|
61 $Id: a 375046bad9d3 Thu, 01 Jan 1970 00:00:01 +0000 user $ |
|
62 $Xinfo: User Name <user@example.com>: firstline $ |
|
63 $Id$ |
|
64 % hg cat |
|
65 $Id$ |
|
66 $Xinfo$ |
|
67 $Id$ |
|
68 % update |
|
69 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
70 % cat |
|
71 $Id$ |
|
72 $Xinfo$ |
|
73 $Id$ |