Mercurial > hgbook
view en/examples/template.simple @ 515:15bf7d50b586
Translated a couple of paragraphs
author | jerojasro@devnull.li |
---|---|
date | Wed, 12 Nov 2008 22:36:35 -0500 |
parents | ceaca14e49f0 |
children |
line wrap: on
line source
#!/bin/bash # So many different bits of random output, it would be a nightmare to # ignore each individually. #$ ignore: .* hg init myrepo cd myrepo echo hello > hello hg commit -Am'added hello' echo hello >> hello echo goodbye > goodbye echo ' added line to end of <<hello>> file.' > ../msg echo '' >> ../msg echo 'in addition, added a file with the helpful name (at least i hope that some might consider it so) of goodbye.' >> ../msg hg commit -Al../msg hg tag mytag hg tag v0.1 #$ name: normal hg log -r1 #$ name: compact hg log --style compact #$ name: changelog hg log --style changelog #$ name: simplest hg log -r1 --template 'i saw a changeset\n' #$ name: simplesub hg log --template 'i saw a changeset: {desc}\n' #$ name: keywords hg log -r1 --template 'author: {author}\n' hg log -r1 --template 'desc:\n{desc}\n' hg log -r1 --template 'files: {files}\n' hg log -r1 --template 'file_adds: {file_adds}\n' hg log -r1 --template 'file_dels: {file_dels}\n' hg log -r1 --template 'node: {node}\n' hg log -r1 --template 'parents: {parents}\n' hg log -r1 --template 'rev: {rev}\n' hg log -r1 --template 'tags: {tags}\n' #$ name: datekeyword hg log -r1 --template 'date: {date}\n' hg log -r1 --template 'date: {date|isodate}\n' #$ name: manyfilters hg log -r1 --template '{author}\n' hg log -r1 --template '{author|domain}\n' hg log -r1 --template '{author|email}\n' hg log -r1 --template '{author|obfuscate}\n' | cut -c-76 hg log -r1 --template '{author|person}\n' hg log -r1 --template '{author|user}\n' hg log -r1 --template 'looks almost right, but actually garbage: {date}\n' hg log -r1 --template '{date|age}\n' hg log -r1 --template '{date|date}\n' hg log -r1 --template '{date|hgdate}\n' hg log -r1 --template '{date|isodate}\n' hg log -r1 --template '{date|rfc822date}\n' hg log -r1 --template '{date|shortdate}\n' hg log -r1 --template '{desc}\n' | cut -c-76 hg log -r1 --template '{desc|addbreaks}\n' | cut -c-76 hg log -r1 --template '{desc|escape}\n' | cut -c-76 hg log -r1 --template '{desc|fill68}\n' hg log -r1 --template '{desc|fill76}\n' hg log -r1 --template '{desc|firstline}\n' hg log -r1 --template '{desc|strip}\n' | cut -c-76 hg log -r1 --template '{desc|tabindent}\n' | expand | cut -c-76 hg log -r1 --template '{node}\n' hg log -r1 --template '{node|short}\n' #$ name: combine hg log -r1 --template 'description:\n\t{desc|strip|fill68|tabindent}\n' #$ name: rev echo 'changeset = "rev: {rev}\n"' > rev hg log -l1 --style ./rev