Functionalities
[F001] Init
This functionality aims to surround : hg init and to adapt it for <ant> tags.
hg init [-e CMD] [--remotecmd CMD] [DEST] create a new repository in the given directory Initialize a new repository in the given directory. If the given directory does not exist, it will be created. If no directory is given, the current directory is used. It is possible to specify an "ssh://" URL as the destination. See 'hg help urls' for more information. options: -e --ssh specify ssh command to use --remotecmd specify hg command to run on the remote side use "hg -v help init" to show global options
Attribute | Description | Value | Required |
---|---|---|---|
cmd | hg command | init | yes |
dir | hg root directory | yes |
<hg cmd="init" dir="/my/rootdirectory" />
[F002] Status
This functionality aims to surround : hg status and to adapt it for <ant> tags.
hg status [OPTION]... [FILE]... aliases: st show changed files in the working directory Show status of files in the repository. If names are given, only files that match are shown. Files that are clean or ignored or the source of a copy/move operation, are not listed unless -c/--clean, -i/--ignored, -C/--copies or -A/--all are given. Unless options described with "show only ..." are given, the options -mardu are used. Option -q/--quiet hides untracked (unknown and ignored) files unless explicitly requested with -u/--unknown or -i/--ignored. NOTE: status may appear to disagree with diff if permissions have changed or a merge has occurred. The standard diff format does not report permission changes and diff only reports changes relative to one merge parent. If one revision is given, it is used as the base revision. If two revisions are given, the differences between them are shown. The codes used to show the status of files are: M = modified A = added R = removed C = clean ! = missing (deleted by non-hg command, but still tracked) ? = not tracked I = ignored = origin of the previous file listed as A (added) options: -A --all show status of all files -m --modified show only modified files -a --added show only added files -r --removed show only removed files -d --deleted show only deleted (but tracked) files -c --clean show only files without changes -u --unknown show only unknown (not tracked) files -i --ignored show only ignored files -n --no-status hide status prefix -C --copies show source of copied files -0 --print0 end filenames with NUL, for use with xargs --rev show difference from revision -I --include include names matching the given patterns -X --exclude exclude names matching the given patterns use "hg -v help status" to show global options
Missing options :
-n --no-status hide status prefix
-C --copies show source of copied files
-0 --print0 end filenames with NUL, for use with xargs
--rev show difference from revision
<hg cmd="status" dir="/my/rootdirectory/dir/to/check" status="modified"> <dirset dir="/my/rootdirectory/dir/to/check"> <include name="**/*.cpp"/> <exclude name="**/*.bak"/> </dirset> </hg>
ant4hg set properties to retrieve status values :
- ant4hg.status.list
- ant4hg.status.♯list
- ant4hg.status.delimiter
<?xml version="1.0" encoding="UTF-8"?> <project name="test-status" basedir="." default="test1" xmlns:ac="antlib:net.sf.antcontrib" xmlns="antlib:org.apache.tools.ant"> <property environment="myenv" /> <path id="ant4hg.classpath"> <fileset dir="BJDOLLAR{myenv.ANT_HOME}/lib"> <include name="ant.jar" /> <include name="ant-launcher.jar" /> <include name="ant4hg.jar" /> <include name="ant-contrib-1.0b3.jar" /> </fileset> </path> <taskdef resource="net/sourceforge/ant4hg/taskdefs/antlib.xml" classpathref="ant4hg.classpath" /> <taskdef resource="net/sf/antcontrib/antlib.xml" classpathref="ant4hg.classpath" /> <target name="test1"> <hg cmd="status" dir="." /> <!-- list all files --> <echo>NB ELEMENTS : BJDOLLAR{ant4hg.status.#list}</echo> <ac:for list="BJDOLLAR{ant4hg.status.list}" delimiter="BJDOLLAR{ant4hg.status.delimiter}" param="line"> <sequential> <echo>LINE : @{line}</echo> </sequential> </ac:for> </target> </project>
[F003] Log
This functionality aims to surround : hg log and to adapt it for <ant> tags.
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
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 |
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"/>
[F004] Add
This functionality aims to surround : hg add and to adapt it for <ant> tags.
hg add [OPTION]... [FILE]... add the specified files on the next commit Schedule files to be version controlled and added to the repository. The files will be added to the repository at the next commit. To undo an add before that, see hg forget. If no names are given, add all files to the repository. options: -I --include include names matching the given patterns -X --exclude exclude names matching the given patterns -n --dry-run do not perform actions, just print output use "hg -v help add" to show global options
<project name="hg-add" default="add" basedir="."> <taskdef resource="net/sourceforge/ant4hg/taskdefs/antlib.xml" /> <property name="user" value="myname"/> <!-- patterns --> <patternset id="cpp.pattern"> <include name="**/*.cpp" /> </patternset> <target name="add"> <hg cmd="add" dir="." pattern="cpp.pattern" /> </target> <target name="add2"> <hg cmd="add" dir="."> <dirset dir="src"> <include name="**/*.java"/> <exclude name="**/*.bak"/> </dirset> </hg> </target> </project>
[F005] Remove
This functionality aims to surround : hg remove and to adapt it for <ant> tags.
hg remove [OPTION]... FILE... aliases: rm remove the specified files on the next commit Schedule the indicated files for removal from the repository. This only removes files from the current branch, not from the entire project history. -A/--after can be used to remove only files that have already been deleted, -f/--force can be used to force deletion, and -Af can be used to remove files from the next revision without deleting them from the working directory. The following table details the behavior of remove for different file states (columns) and option combinations (rows). The file states are Added [A], Clean [C], Modified [M] and Missing [!] (as reported by hg status). The actions are Warn, Remove (from branch) and Delete (from disk): A C M ! none W RD W R -f R RD RD R -A W W W R -Af R R R R This command schedules the files to be removed at the next commit. To undo a remove before that, see hg revert. options: -A --after record delete for missing files -f --force remove (and delete) file even if added or modified -I --include include names matching the given patterns -X --exclude exclude names matching the given patterns use "hg -v help remove" to show global options
Attribute | Description | Value | Required |
---|---|---|---|
cmd | hg command | remove | yes |
dir | directory to remove | yes | |
after | record delete for missing files | true/false, yes/no, on/off | no |
force | remove (and delete) file even if added or modified | true/false, yes/no, on/off | no |
Nested element | Description | Required | |
dirset | resource collections | no | |
arg | command line argument value | no |
<hg cmd="remove" dir="."> <dirset dir="/my/rootdirectory/dir/where/remove" force="true"> <include name="BJDOLLAR{pattern.include}"/> </dirset> </hg>
[F006] Commit
This functionality aims to surround : hg commit and to adapt it for <ant> tags.
hg commit [OPTION]... [FILE]... aliases: ci commit the specified files or all outstanding changes Commit changes to the given files into the repository. Unlike a centralized RCS, this operation is a local operation. See hg push for a way to actively distribute your changes. If a list of files is omitted, all changes reported by "hg status" will be committed. If you are committing the result of a merge, do not provide any filenames or -I/-X filters. If no commit message is specified, the configured editor is started to prompt you for a message. See 'hg help dates' for a list of formats valid for -d/--date. options: -A --addremove mark new/missing files as added/removed before committing --close-branch mark a branch as closed, hiding it from the branch list -I --include include names matching the given patterns -X --exclude exclude names matching the given patterns -m --message use <text> as commit message -l --logfile read commit message from <file> -d --date record datecode as commit date -u --user record the specified user as committer use "hg -v help commit" to show global options
Attribute | Description | Value | Required |
---|---|---|---|
cmd | hg command | commit | yes |
dir | directory to commit | yes | |
message | commit message | no | |
logfile | commit message - (message parameter has priority) | no | |
date | commit date | no | |
user | commit user | no | |
addremove | mark new/missing files as added/removed before committing | true/false, yes/no, on/off | no |
closebranch | mark a branch as closed, hiding it from the branch list | true/false, yes/no, on/off | no |
Nested element | Description | Required | |
dirset | resource collections | no | |
arg | command line argument value | no |
<hg cmd="commit" dir="." message="BJDOLLAR{message}" user="BJDOLLAR{user}"> <dirset dir="/my/rootdirectory/dir/to/commit"> <include name="BJDOLLAR{pattern.include}"/> <exclude name="BJDOLLAR{pattern.exclude}"/> </dirset> </hg>
[F007] Update
This functionality aims to surround : hg update and to adapt it for <ant> tags.
hg update [-c] [-C] [-d DATE] [[-r] REV] aliases: up, checkout, co update working directory Update the repository's working directory to the specified changeset. If no changeset is specified, attempt to update to the head of the current branch. If this head is a descendant of the working directory's parent, update to it, otherwise abort. The following rules apply when the working directory contains uncommitted changes: 1. If neither -c/--check nor -C/--clean is specified, and if the requested changeset is an ancestor or descendant of the working directory's parent, the uncommitted changes are merged into the requested changeset and the merged result is left uncommitted. If the requested changeset is not an ancestor or descendant (that is, it is on another branch), the update is aborted and the uncommitted changes are preserved. 2. With the -c/--check option, the update is aborted and the uncommitted changes are preserved. 3. With the -C/--clean option, uncommitted changes are discarded and the working directory is updated to the requested changeset. Use null as the changeset to remove the working directory (like 'hg clone -U'). If you want to update just one file to an older changeset, use 'hg revert'. See 'hg help dates' for a list of formats valid for -d/--date. options: -C --clean discard uncommitted changes (no backup) -c --check check for uncommitted changes -d --date tipmost revision matching date -r --rev revision use "hg -v help update" to show global options
Attribute | Description | Value | Required |
---|---|---|---|
cmd | hg command | update | yes |
dir | directory to update | yes | |
clean | overwrite locally modified files (no backup) | true/false, yes/no, on/off | no |
date | tipmost revision matching date | no | |
revision | revision | no | |
check | check for uncommitted changes | true/false, yes/no, on/off | no |
Nested element | Description | Required | |
dirset | resource collections | no | |
arg | command line argument value | no |
<hg cmd="update" dir="/my/rootdirectory/dir/to/update" revision="1"/>
[F008] Clone
This functionality aims to surround : hg clone and to adapt it for <ant> tags.
hg clone [OPTION]... SOURCE [DEST] make a copy of an existing repository Create a copy of an existing repository in a new directory. If no destination directory name is specified, it defaults to the basename of the source. The location of the source is added to the new repository's .hg/hgrc file, as the default to be used for future pulls. See 'hg help urls' for valid source format details. It is possible to specify an "ssh://" URL as the destination, but no .hg/hgrc and working directory will be created on the remote side. Please see 'hg help urls' for important details about "ssh://" URLs. If the -U/--noupdate option is specified, the new clone will contain only a repository (.hg) and no working copy (the working copy parent will be the null changeset). Otherwise, clone will initially check out (in order of precedence): a) the changeset, tag or branch specified with -u/--updaterev b) the changeset, tag or branch given with the first -r/--rev c) the head of the default branch Use 'hg clone -u . src dst' to checkout the source repository's parent changeset (applicable for local source repositories only). A set of changesets (tags, or branch names) to pull may be specified by listing each changeset (tag, or branch name) with -r/--rev. If -r/--rev is used, the cloned repository will contain only a subset of the changesets of the source repository. Only the set of changesets defined by all -r/--rev options (including all their ancestors) will be pulled into the destination repository. No subsequent changesets (including subsequent tags) will be present in the destination. Using -r/--rev (or 'clone src#rev dest') implies --pull, even for local source repositories. For efficiency, hardlinks are used for cloning whenever the source and destination are on the same filesystem (note this applies only to the repository data, not to the checked out files). Some filesystems, such as AFS, implement hardlinking incorrectly, but do not report errors. In these cases, use the --pull option to avoid hardlinking. In some cases, you can clone repositories and checked out files using full hardlinks with $ cp -al REPO REPOCLONE This is the fastest way to clone, but it is not always safe. The operation is not atomic (making sure REPO is not modified during the operation is up to you) and you have to make sure your editor breaks hardlinks (Emacs and most Linux Kernel tools do so). Also, this is not compatible with certain extensions that place their metadata under the .hg directory, such as mq. options: -U --noupdate the clone will only contain a repository (no working copy) -u --updaterev revision, tag or branch to check out -r --rev clone only the specified revisions and ancestors --pull use pull protocol to copy metadata --uncompressed use uncompressed transfer (fast over LAN) -e --ssh specify ssh command to use --remotecmd specify hg command to run on the remote side use "hg -v help clone" to show global options
Attribute | Description | Value | Required |
---|---|---|---|
source | the local or remote source to clone |
- http://url
- https://url - file://path | path - ssh://url NEED HELP FOR SSH |
yes if current directory is not a local repository.
no otherwise : uses current directory by default |
destination | the destination directory | no, default is the basename of the source | |
noupdate | the clone will only contain a repository (no working copy) | true/false, yes/no, on/off | no |
revision | clone only the specified revisions and ancestors | no | |
pull | use pull protocol to copy metadata | true/false, yes/no, on/off | no |
uncompressed | use uncompressed transfer (fast over LAN) | true/false, yes/no, on/off | no |
ssh | specify ssh command to use | no | |
remotecmd | specify hg command to run on the remote side | no | |
Nested element | Description | Required | |
dirset | resource collections | no | |
arg | command line argument value | no | |
auth | authentification | no : hg uses hgrc configuration by default |
hg source | hg destination | |
---|---|---|
<hg source="BJDOLLAR{src.val}" /> | BJDOLLAR{src.val} |
basename of the source :
http://mercurial.intuxication.org/hg/ant4hg-tests => ./ant4hg-tests file://path/to/my/dir => ./dir |
<hg destination="BJDOLLAR{dest.val}" /> |
current directory
must be local repository root directory (that contains .hg) |
BJDOLLAR{dest.val} |
<hg source="BJDOLLAR{src.val} destination="BJDOLLAR{dest.val}" /> | BJDOLLAR{src.val} | BJDOLLAR{dest.val} |
# clone repository to ./ant4hg-tests : the basename of the source <hg cmd="clone" source="http://mercurial.intuxication.org/hg/ant4hg-tests"/> # clone repository to the given directory <hg cmd="clone" source="http://mercurial.intuxication.org/hg/ant4hg-tests" destination="path/to/dir" />
[F009] Pull
This functionality aims to surround : hg pull and to adapt it for <ant> tags.
hg pull [-u] [-f] [-r REV]... [-e CMD] [--remotecmd CMD] [SOURCE] pull changes from the specified source Pull changes from a remote repository to a local one. This finds all changes from the repository at the specified path or URL and adds them to a local repository (the current one unless -R is specified). By default, this does not update the copy of the project in the working directory. Use hg incoming if you want to see what would have been added by a pull at the time you issued this command. If you then decide to added those changes to the repository, you should use pull -r X where X is the last changeset listed by hg incoming. If SOURCE is omitted, the 'default' path will be used. See 'hg help urls' for more information. options: -u --update update to new tip if changesets were pulled -f --force run even when remote repository is unrelated -r --rev a specific remote revision up to which you would like to pull -e --ssh specify ssh command to use --remotecmd specify hg command to run on the remote side use "hg -v help pull" to show global options
Attribute | Description | Value | Required |
---|---|---|---|
dir | the local directory | no : uses current directory by default | |
source | the local or remote source to pull |
- http://url
- https://url - file://path | path - ssh://url NEED HELP FOR SSH |
no : hg uses hgrc configuration by default |
update | update to new tip if changesets were pulled | true/false, yes/no, on/off | no |
force | run even when remote repository is unrelated | true/false, yes/no, on/off | no |
revision | a specific revision up to which you would like to pull | no | |
ssh | specify ssh command to use | no | |
remotecmd | specify hg command to run on the remote side | no | |
Nested element | Description | Required | |
dirset | resource collections | no | |
arg | command line argument value | no | |
auth | authentification | no : hg uses hgrc configuration by default |
# without prompt using read-only access <hg cmd="pull" dir="ant4hg" source="http://hg.code.sf.net/p/ant4hg/code"/> # using ant4hg authentification : <hg cmd="pull" dir="/my/local/dir/" source="http://mercurial.intuxication.org/hg/ant4hg-tests" update="true"> <auth user="ant4hg" password="******" /> </hg> # using hgrc configuration : <hg cmd="pull" dir="my/local/repository"/> # hgrc : [paths] default=http://mercurial.intuxication.org/hg/ant4hg-tests default-push=http://mercurial.intuxication.org/hg/ant4hg-tests [auth] ant4hg.prefix = http://mercurial.intuxication.org ant4hg.username = ant4hg ant4hg.password = ****** ant4hg.schemes = http
[F010] Push
This functionality aims to surround : hg push and to adapt it for <ant> tags.
hg push [-f] [-r REV]... [-e CMD] [--remotecmd CMD] [DEST] push changes to the specified destination Push changes from the local repository to the given destination. This is the symmetrical operation for pull. It moves changes from the current repository to a different one. If the destination is local this is identical to a pull in that directory from the current one. By default, push will refuse to run if it detects the result would increase the number of remote heads. This generally indicates the user forgot to pull and merge before pushing. If -r/--rev is used, the named revision and all its ancestors will be pushed to the remote repository. Please see 'hg help urls' for important details about "ssh://" URLs. If DESTINATION is omitted, a default path will be used. options: -f --force force push -r --rev a specific revision up to which you would like to push -e --ssh specify ssh command to use --remotecmd specify hg command to run on the remote side use "hg -v help push" to show global options
Attribute | Description | Value | Required |
---|---|---|---|
dir | the local directory | no : uses current directory by default | |
destination | the local or remote destination |
- http://url
- https://url - file://path | path - ssh://url NEED HELP FOR SSH |
no : hg uses hgrc configuration by default |
force | force push | true/false, yes/no, on/off | no |
revision | a specific revision up to which you would like to push | no | |
ssh | specify ssh command to use | no | |
remotecmd | specify hg command to run on the remote side | no | |
Nested element | Description | Required | |
dirset | resource collections | no | |
arg | command line argument value | no | |
auth | authentification | no : hg uses hgrc configuration by default |
# using ant4hg authentification : <hg cmd="push" dir="/my/local/dir/" destination="http://mercurial.intuxication.org/hg/ant4hg-tests"> <auth user="ant4hg" password="******" /> </hg> # using hgrc configuration : <hg cmd="push" dir="my/local/repository"/> # hgrc : [paths] default=http://mercurial.intuxication.org/hg/ant4hg-tests default-push=http://mercurial.intuxication.org/hg/ant4hg-tests [auth] ant4hg.prefix = http://mercurial.intuxication.org ant4hg.username = ant4hg ant4hg.password = ****** ant4hg.schemes = http
[F011] Export
This functionality aims to surround : hg export and to adapt it for <ant> tags.
hg export [OPTION]... [-o OUTFILESPEC] REV... dump the header and diffs for one or more changesets Print the changeset header and diffs for one or more revisions. The information shown in the changeset header is: author, changeset hash, parent(s) and commit comment. NOTE: export may generate unexpected diff output for merge changesets, as it will compare the merge changeset against its first parent only. Output may be to a file, in which case the name of the file is given using a format string. The formatting rules are as follows: "%%" literal "%" character "%H" changeset hash (40 bytes of hexadecimal) "%N" number of patches being generated "%R" changeset revision number "%b" basename of the exporting repository "%h" short-form changeset hash (12 bytes of hexadecimal) "%n" zero-padded sequence number, starting at 1 "%r" zero-padded changeset revision number Without the -a/--text option, export will avoid generating diffs of files it detects as binary. With -a, export will generate a diff anyway, probably with undesirable results. Use the -g/--git option to generate diffs in the git extended diff format. See 'hg help diffs' for more information. With the --switch-parent option, the diff will be against the second parent. It can be useful to review a merge. options: -o --output print output to file with formatted name --switch-parent diff against the second parent -a --text treat all files as text -g --git use git extended diff format --nodates don't include dates in diff headers use "hg -v help export" to show global options
Attribute | Description | Value | Required |
---|---|---|---|
cmd | hg command | export | yes |
dir | the directory to export | yes | |
revision | the revision(s) to export | R1[;R2;...] | yes |
output | print output to file with formatted name | no | |
switchparent | diff against the second parent | true/false, yes/no, on/off | no |
text | treat all files as text | true/false, yes/no, on/off | no |
git | use git extended diff format | true/false, yes/no, on/off | no |
nodates | don't include dates in diff headers | true/false, yes/no, on/off | no |
Nested element | Description | Required | |
dirset | resource collections | no | |
arg | command line argument value | no |
<hg cmd="export" dir="/my/directory/to/export"/>
[F013] Tag
This functionality aims to surround : hg tag and to adapt it for <ant> tags.
hg tag [-f] [-l] [-m TEXT] [-d DATE] [-u USER] [-r REV] NAME... add one or more tags for the current or given revision Name a particular revision using <name>. Tags are used to name particular revisions of the repository and are very useful to compare different revisions, to go back to significant earlier versions or to mark branch points as releases, etc. If no revision is given, the parent of the working directory is used, or tip if no revision is checked out. To facilitate version control, distribution, and merging of tags, they are stored as a file named ".hgtags" which is managed similarly to other project files and can be hand-edited if necessary. The file '.hg/localtags' is used for local tags (not shared among repositories). See 'hg help dates' for a list of formats valid for -d/--date. options: -f --force replace existing tag -l --local make the tag local -r --rev revision to tag --remove remove a tag -m --message use <text> as commit message -d --date record datecode as commit date -u --user record the specified user as committer use "hg -v help tag" to show global options
Attribute | Description | Value | Required |
---|---|---|---|
cmd | hg command | tag | yes |
dir | directory to tag | yes | |
tag | name of the tag | yes | |
force | replace existing tag | true/false, yes/no, on/off | no |
local | make the tag local | true/false, yes/no, on/off | no |
revision | revision to tag | no | |
remove | remove a tag | true/false, yes/no, on/off | no |
message | use <text> as commit message | no | |
date | record datecode as commit date | no | |
user | record the specified user as committer | yes |
[F014] AddRemove
This functionality aims to surround : hg addremove and to adapt it for <ant> tags.
hg addremove [OPTION]... [FILE]... add all new files, delete all missing files Add all new files and remove all missing files from the repository. New files are ignored if they match any of the patterns in .hgignore. As with add, these changes take effect at the next commit. Use the -s/--similarity option to detect renamed files. With a parameter greater than 0, this compares every removed file with every added file and records those similar enough as renames. This option takes a percentage between 0 (disabled) and 100 (files must be identical) as its parameter. Detecting renamed files this way can be expensive. options: -s --similarity guess renamed files by similarity (0<=s<=100) -I --include include names matching the given patterns -X --exclude exclude names matching the given patterns -n --dry-run do not perform actions, just print output use "hg -v help addremove" to show global options
<project name="hg-addremove" default="addremove" basedir="."> <taskdef resource="net/sourceforge/ant4hg/taskdefs/antlib.xml" /> <property name="user" value="myname"/> <!-- patterns --> <patternset id="cpp.pattern"> <include name="**/*.cpp" /> </patternset> <target name="addremove"> <hg cmd="addremove" dir="." pattern="cpp.pattern" /> </target> <target name="add2"> <hg cmd="addremove" dir="."> <dirset dir="src"> <include name="**/*.java"/> <exclude name="**/*.bak"/> </dirset> </hg> </target> </project>