hgbook

annotate en/examples/template.svnstyle @ 881:3df0c9cfe902

Only run updatepo when required
author Dongsheng Song <dongsheng.song@gmail.com>
date Wed Oct 21 16:21:42 2009 +0800 (2009-10-21)
parents f2aabd15dd50
children
rev   line source
bos@83 1 #!/bin/bash
bos@83 2
bos@83 3 svn() {
bos@83 4 cat $EXAMPLE_DIR/svn-short.txt
bos@83 5 }
bos@83 6
bos@83 7 #$ name: short
bos@83 8
bos@83 9 svn log -r9653
bos@83 10
bos@83 11 #$ name:
bos@83 12
bos@83 13 hg init myrepo
bos@83 14 cd myrepo
bos@83 15
bos@83 16 echo hello > hello
bos@83 17 hg commit -Am'added hello'
bos@83 18
bos@83 19 echo hello >> hello
bos@83 20 echo goodbye > goodbye
bos@83 21 echo ' added line to end of <<hello>> file.' > ../msg
bos@83 22 echo '' >> ../msg
bos@83 23 echo 'in addition, added a file with the helpful name (at least i hope that some might consider it so) of goodbye.' >> ../msg
bos@83 24
bos@83 25 hg commit -Al../msg
bos@83 26
bos@83 27 hg tag mytag
bos@83 28 hg tag v0.1
bos@83 29
bos@83 30 echo 'changeset = "{node|short}\n"' > svn.style
bos@83 31
bos@83 32 #$ name: id
bos@83 33
bos@83 34 hg log -r0 --template '{node}'
bos@83 35
bos@83 36 #$ name: simplest
bos@548 37 #$ ignore: \d+-\d+-\d+ \d+:\d+ \+.*
bos@83 38
bos@83 39 cat svn.style
bos@83 40 hg log -r1 --style svn.style
bos@83 41
bos@83 42 #$ name:
bos@83 43
bos@83 44 echo 'changeset =' > broken.style
bos@83 45
bos@83 46 #$ name: syntax.input
bos@83 47
bos@83 48 cat broken.style
bos@83 49
bos@83 50 #$ name: syntax.error
bos@83 51
bos@83 52 hg log -r1 --style broken.style
bos@83 53
bos@83 54 #$ name:
bos@83 55
bos@83 56 cp $EXAMPLE_DIR/svn.style .
bos@83 57 cp $EXAMPLE_DIR/svn.template .
bos@83 58
bos@83 59 #$ name: template
bos@83 60
bos@83 61 cat svn.template
bos@83 62
bos@83 63 #$ name: style
bos@83 64
bos@83 65 cat svn.style
bos@83 66
bos@83 67 #$ name: result
bos@143 68 #$ ignore: \| 200[78].*
bos@83 69
bos@83 70 hg log -r1 --style svn.style
bos@83 71