author | Christian Ebert <blacktrash@gmx.net> |
Thu, 08 Feb 2007 15:13:28 +0100 | |
branch | kwmap-templates |
changeset 131 | 23a1e1bdf62b |
parent 121 | 85ed7d71ba0f |
child 148 | c0baa881d90a |
permissions | -rwxr-xr-x |
121 | 1 |
#!/bin/sh |
2 |
||
3 |
cat <<EOF >> $HGRCPATH |
|
4 |
[extensions] |
|
5 |
hgext.keyword = |
|
6 |
[keyword] |
|
7 |
* = |
|
8 |
b* = ignore |
|
9 |
EOF |
|
10 |
||
11 |
echo % help |
|
12 |
hg help keyword |
|
13 |
||
14 |
hg init a |
|
15 |
cd a |
|
16 |
echo '$Id$' > a |
|
17 |
echo '$Id$' > b |
|
18 |
echo % cat |
|
19 |
cat a b |
|
20 |
||
21 |
echo % default keyword expansion |
|
22 |
echo % commit |
|
23 |
hg --debug commit -A -m ab -d '0 0' -u 'User Name <user@example.com>' |
|
131
23a1e1bdf62b
Check dirstate after commits in test
Christian Ebert <blacktrash@gmx.net>
parents:
121
diff
changeset
|
24 |
echo % status |
23a1e1bdf62b
Check dirstate after commits in test
Christian Ebert <blacktrash@gmx.net>
parents:
121
diff
changeset
|
25 |
hg status |
121 | 26 |
|
27 |
echo % cat |
|
28 |
cat a b |
|
29 |
echo % hg cat |
|
30 |
hg cat a b |
|
31 |
||
32 |
rm a b |
|
33 |
echo % update |
|
34 |
hg update |
|
35 |
echo % cat |
|
36 |
cat a b |
|
37 |
||
38 |
echo % custom keyword expansion |
|
39 |
cat <<EOF >>$HGRCPATH |
|
40 |
[keywordmaps] |
|
41 |
Id = {file} {node|short} {date|rfc822date} {author|user} |
|
42 |
Xinfo = {author}: {desc} |
|
43 |
EOF |
|
44 |
||
45 |
echo % cat |
|
46 |
cat a b |
|
47 |
echo % hg cat |
|
48 |
hg cat a b |
|
49 |
||
50 |
echo '$Xinfo$' >> a |
|
51 |
cat <<EOF >> log |
|
52 |
firstline |
|
53 |
secondline |
|
54 |
EOF |
|
55 |
||
56 |
echo % commit |
|
57 |
hg --debug commit -l log -d '1 0' -u 'User Name <user@example.com>' |
|
131
23a1e1bdf62b
Check dirstate after commits in test
Christian Ebert <blacktrash@gmx.net>
parents:
121
diff
changeset
|
58 |
rm log |
23a1e1bdf62b
Check dirstate after commits in test
Christian Ebert <blacktrash@gmx.net>
parents:
121
diff
changeset
|
59 |
echo % status |
23a1e1bdf62b
Check dirstate after commits in test
Christian Ebert <blacktrash@gmx.net>
parents:
121
diff
changeset
|
60 |
hg status |
121 | 61 |
|
62 |
echo % cat |
|
63 |
cat a b |
|
64 |
echo % hg cat |
|
65 |
hg cat a b |
|
66 |
||
67 |
echo % switch off expansion |
|
68 |
rm $HGRCPATH |
|
69 |
||
70 |
echo % cat |
|
71 |
cat a b |
|
72 |
echo % hg cat |
|
73 |
hg cat a b |
|
74 |
||
75 |
echo % update |
|
76 |
rm a b |
|
77 |
hg update |
|
78 |
||
79 |
echo % cat |
|
80 |
cat a b |