[F003] Log
This functionality aims to surround : hg log and to adapt it for <ant> tags.
Shell command
hg log [OPTION]... [FILE] aliases: history show revision history of entire repository or files Print the revision history of the specified files or the entire project. File history is shown without following rename or copy history of files. Use -f/--follow with a filename to follow history across renames and copies. --follow without a filename will only show ancestors or descendants of the starting revision. --follow-first only follows the first parent of merge revisions. If no revision range is specified, the default is tip:0 unless --follow is set, in which case the working directory parent is used as the starting revision. See 'hg help dates' for a list of formats valid for -d/--date. By default this command prints revision number and changeset id, tags, non-trivial parents, user, date and time, and a summary for each commit. When the -v/--verbose switch is used, the list of changed files and full commit message are shown. NOTE: log -p/--patch may generate unexpected diff output for merge changesets, as it will only compare the merge changeset against its first parent. Also, only files different from BOTH parents will appear in files:. options: -f --follow follow changeset history, or file history across copies and renames --follow-first only follow the first parent of merge changesets -d --date show revisions matching date spec -C --copies show copied files -k --keyword do case-insensitive search for a keyword -r --rev show the specified revision or range --removed include revisions where files were removed -m --only-merges show only merges -u --user revisions committed by user -b --only-branch show only changesets within the given named branch -P --prune do not display revision or any of its ancestors -p --patch show patch -g --git use git extended diff format -l --limit limit number of changes displayed -M --no-merges do not show merges --style display using template map file --template display with template -I --include include names matching the given patterns -X --exclude exclude names matching the given patterns use "hg -v help log" to show global options
Parameters
Attribute | Description | Value | Required |
---|---|---|---|
cmd | hg command | log | yes |
dir | directory to log | yes | |
follow |
follow changeset history, or file history across copies and
renames
if first : only follow the first parent of merge changesets |
true/false | yes/no | on/off |
first (only follow the first parent of merge changesets) |
no |
date | show revisions matching date spec | no | |
copies | show copied files | true/false | yes/no | on/off | no |
keyword | do case-insensitive search for a keyword | no | |
revision | show the specified revision or range | no | |
removed | include revisions where files were removed | true/false | yes/no | on/off | no |
merges |
yes : show only merges
no : do not show merges |
true/false | yes/no | on/off | no |
user | revisions committed by user | no | |
branch | show only changesets within the given named branch | no | |
prune | do not display revision or any of its ancestors | no | |
patch | show patch | true/false | yes/no | on/off | no |
git | use git extended diff format | true/false | yes/no | on/off | no |
limit | limit number of changes displayed | no | |
style | display using template map file | no | |
template | display with template | no | |
Nested element | Description | Required | |
dirset | resource collections | no | |
arg | command line argument value | no |
Examples
ant4hg set properties to retrieve log values :
- ant4hg.log.revision
- ant4hg.log.changeset
- ant4hg.log.tag
- ant4hg.log.branch
- ant4hg.log.user
- ant4hg.log.date
- ant4hg.log.summary
<hg cmd="log" dir="/my/rootdirectory/dir/to/show" > <arg value="-rtip"/> </hg> <echo message="==========================" /> <echo message="revision = BJDOLLAR{ant4hg.log.revision}" /> <echo message="changeset = BJDOLLAR{ant4hg.log.changeset}" /> <echo message="tag = BJDOLLAR{ant4hg.log.tag}" /> <echo message="branch = BJDOLLAR{ant4hg.log.branch}" /> <echo message="user = BJDOLLAR{ant4hg.log.user}" /> <echo message="date = BJDOLLAR{ant4hg.log.date}" /> <echo message="summary = BJDOLLAR{ant4hg.log.summary}" /> <hg cmd="log" dir="/my/rootdirectory/dir/to/show" revision="tip"/>