Currently the !REPO_BRANCH directive can only be used to specify a branch to checkout in a git or hg repository. Tags can already be checked out in hg since the command is the same as for checking out branches. In git however, the 'git checkout --track -b branch' command will fail if the specified branch is actually a tag. GetComponents should compare the branch name with the output of
git tag -l, and if a match is found it should checkout the tag. Darcs currently does not support !REPO_BRANCH at all; this should be implemented.