Mercurial > hgbook
comparison en/examples/template.svnstyle @ 83:b476081a9c04
Much progress in template chapter.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Tue, 03 Oct 2006 13:03:42 -0700 |
parents | |
children | 627effec9d4e |
comparison
equal
deleted
inserted
replaced
82:1279bc11dfdf | 83:b476081a9c04 |
---|---|
1 #!/bin/bash | |
2 | |
3 svn() { | |
4 cat $EXAMPLE_DIR/svn-short.txt | |
5 } | |
6 | |
7 #$ name: short | |
8 | |
9 svn log -r9653 | |
10 | |
11 #$ name: | |
12 | |
13 hg init myrepo | |
14 cd myrepo | |
15 | |
16 echo hello > hello | |
17 hg commit -Am'added hello' | |
18 | |
19 echo hello >> hello | |
20 echo goodbye > goodbye | |
21 echo ' added line to end of <<hello>> file.' > ../msg | |
22 echo '' >> ../msg | |
23 echo 'in addition, added a file with the helpful name (at least i hope that some might consider it so) of goodbye.' >> ../msg | |
24 | |
25 hg commit -Al../msg | |
26 | |
27 hg tag mytag | |
28 hg tag v0.1 | |
29 | |
30 echo 'changeset = "{node|short}\n"' > svn.style | |
31 | |
32 #$ name: id | |
33 | |
34 hg log -r0 --template '{node}' | |
35 | |
36 #$ name: simplest | |
37 | |
38 cat svn.style | |
39 hg log -r1 --style svn.style | |
40 | |
41 #$ name: | |
42 | |
43 echo 'changeset =' > broken.style | |
44 | |
45 #$ name: syntax.input | |
46 | |
47 cat broken.style | |
48 | |
49 #$ name: syntax.error | |
50 | |
51 hg log -r1 --style broken.style | |
52 | |
53 #$ name: | |
54 | |
55 cp $EXAMPLE_DIR/svn.style . | |
56 cp $EXAMPLE_DIR/svn.template . | |
57 | |
58 #$ name: template | |
59 | |
60 cat svn.template | |
61 | |
62 #$ name: style | |
63 | |
64 cat svn.style | |
65 | |
66 #$ name: result | |
67 | |
68 hg log -r1 --style svn.style | |
69 |