Mercurial > hgbook
comparison ja/examples/template.simple @ 290:b0db5adf11c1 ja_root
fork Japanese translation.
author | Yoshiki Yazawa <yaz@cc.rim.or.jp> |
---|---|
date | Wed, 06 Feb 2008 17:43:11 +0900 |
parents | en/examples/template.simple@ceaca14e49f0 |
children |
comparison
equal
deleted
inserted
replaced
289:7be02466421b | 290:b0db5adf11c1 |
---|---|
1 #!/bin/bash | |
2 | |
3 # So many different bits of random output, it would be a nightmare to | |
4 # ignore each individually. | |
5 #$ ignore: .* | |
6 | |
7 hg init myrepo | |
8 cd myrepo | |
9 echo hello > hello | |
10 hg commit -Am'added hello' | |
11 | |
12 echo hello >> hello | |
13 echo goodbye > goodbye | |
14 echo ' added line to end of <<hello>> file.' > ../msg | |
15 echo '' >> ../msg | |
16 echo 'in addition, added a file with the helpful name (at least i hope that some might consider it so) of goodbye.' >> ../msg | |
17 | |
18 hg commit -Al../msg | |
19 | |
20 hg tag mytag | |
21 hg tag v0.1 | |
22 | |
23 #$ name: normal | |
24 | |
25 hg log -r1 | |
26 | |
27 #$ name: compact | |
28 | |
29 hg log --style compact | |
30 | |
31 #$ name: changelog | |
32 | |
33 hg log --style changelog | |
34 | |
35 #$ name: simplest | |
36 | |
37 hg log -r1 --template 'i saw a changeset\n' | |
38 | |
39 #$ name: simplesub | |
40 | |
41 hg log --template 'i saw a changeset: {desc}\n' | |
42 | |
43 #$ name: keywords | |
44 | |
45 hg log -r1 --template 'author: {author}\n' | |
46 hg log -r1 --template 'desc:\n{desc}\n' | |
47 hg log -r1 --template 'files: {files}\n' | |
48 hg log -r1 --template 'file_adds: {file_adds}\n' | |
49 hg log -r1 --template 'file_dels: {file_dels}\n' | |
50 hg log -r1 --template 'node: {node}\n' | |
51 hg log -r1 --template 'parents: {parents}\n' | |
52 hg log -r1 --template 'rev: {rev}\n' | |
53 hg log -r1 --template 'tags: {tags}\n' | |
54 | |
55 #$ name: datekeyword | |
56 | |
57 hg log -r1 --template 'date: {date}\n' | |
58 hg log -r1 --template 'date: {date|isodate}\n' | |
59 | |
60 #$ name: manyfilters | |
61 | |
62 hg log -r1 --template '{author}\n' | |
63 hg log -r1 --template '{author|domain}\n' | |
64 hg log -r1 --template '{author|email}\n' | |
65 hg log -r1 --template '{author|obfuscate}\n' | cut -c-76 | |
66 hg log -r1 --template '{author|person}\n' | |
67 hg log -r1 --template '{author|user}\n' | |
68 | |
69 hg log -r1 --template 'looks almost right, but actually garbage: {date}\n' | |
70 hg log -r1 --template '{date|age}\n' | |
71 hg log -r1 --template '{date|date}\n' | |
72 hg log -r1 --template '{date|hgdate}\n' | |
73 hg log -r1 --template '{date|isodate}\n' | |
74 hg log -r1 --template '{date|rfc822date}\n' | |
75 hg log -r1 --template '{date|shortdate}\n' | |
76 | |
77 hg log -r1 --template '{desc}\n' | cut -c-76 | |
78 hg log -r1 --template '{desc|addbreaks}\n' | cut -c-76 | |
79 hg log -r1 --template '{desc|escape}\n' | cut -c-76 | |
80 hg log -r1 --template '{desc|fill68}\n' | |
81 hg log -r1 --template '{desc|fill76}\n' | |
82 hg log -r1 --template '{desc|firstline}\n' | |
83 hg log -r1 --template '{desc|strip}\n' | cut -c-76 | |
84 hg log -r1 --template '{desc|tabindent}\n' | expand | cut -c-76 | |
85 | |
86 hg log -r1 --template '{node}\n' | |
87 hg log -r1 --template '{node|short}\n' | |
88 | |
89 #$ name: combine | |
90 | |
91 hg log -r1 --template 'description:\n\t{desc|strip|fill68|tabindent}\n' | |
92 | |
93 #$ name: rev | |
94 | |
95 echo 'changeset = "rev: {rev}\n"' > rev | |
96 hg log -l1 --style ./rev |