Hi Rick, thanks for your contribution. A similar
incarnation of the
<info> command was committed to the repository today
(contributed by
Jeremy Whitlock -- I took a quick skim over your version a
while back,
but had already spoken with Jeremy about reviewing his, and
find the
"UI" a little simpler). Do you see any features
which are missing
from the code in the svnant repository which your patch
provides, or
you think are essential? Your feedback on what's actually
in the
repository, and whether it meets the needs of the use case
which
spurred you to write this patch, would be great to have.
Thanks,
- Dan
On Thu, 08 Dec 2005, Rick Beton wrote:
> Hi all,
>
> I need a <svn><info/></svn> task in
svnant. There isn't one yet so I
> wrote one myself based on the current Subversion HEAD.
I have attached
> it as a contribution for svnant.
>
> There are three changed files:
>
> * the new Info.java (attached)
> * the revised svn.html documentation (attached). This
has also been
> rewritten to use validated XHTML.
> * the modified SvnTask.java
>
> The diffs for SvnTask are simply
>
============================================================
=======
> --- SvnTask.java (revision 1895)
> +++ SvnTask.java (working copy)
>  -140,6 +140,10 
> commands.add(a);
> }
>
> + public void addInfo(Info a) {
> + commands.add(a);
> + }
> +
> public void addMkdir(Mkdir a) {
> commands.add(a);
> }
>
============================================================
=======
>
>
> Regards,
> Rick
>
> --
> Richard Beton BSc (Hons)
> Consultant
> Email: richard.beton roke.co.uk
> Telephone: +44 (0)1794 833458
>
> Roke Manor Research Ltd, A SIEMENS Company.
> Old Salisbury Lane, Romsey, Hampshire S051 0ZN
>
> http://www.roke.co.uk/
>
>
> --
>
> Visit our website at www.roke.co.uk
>
> Roke Manor Research Ltd, Roke Manor, Romsey, Hampshire
SO51 0ZN, UK.
>
> The information contained in this e-mail and any
attachments is proprietary
> to
> Roke Manor Research Ltd and must not be passed to any
third party without
> permission. This communication is for information only
and shall not create
> or
> change any contractual relationship.
>
> /*
============================================================
========
> * The Apache Software License, Version 1.1
> *
> * Copyright (c) 2000 The Apache Software Foundation.
All rights
> * reserved.
> *
> * Redistribution and use in source and binary forms,
with or without
> * modification, are permitted provided that the
following conditions
> * are met:
> *
> * 1. Redistributions of source code must retain the
above copyright
> * notice, this list of conditions and the following
disclaimer.
> *
> * 2. Redistributions in binary form must reproduce the
above copyright
> * notice, this list of conditions and the following
disclaimer in
> * the documentation and/or other materials provided
with the
> * distribution.
> *
> * 3. The end-user documentation included with the
redistribution,
> * if any, must include the following
acknowledgment:
> * "This product includes software
developed by the
> * Apache Software Foundation (http://www.apache.org/).&
quot;
> * Alternately, this acknowledgment may appear in
the software itself,
> * if and wherever such third-party acknowledgments
normally appear.
> *
> * 4. The names "Apache" and "Apache
Software Foundation" must
> * not be used to endorse or promote products
derived from this
> * software without prior written permission. For
written
> * permission, please contact apache apache.org.
> *
> * 5. Products derived from this software may not be
called "Apache",
> * nor may "Apache" appear in their
name, without prior written
> * permission of the Apache Software Foundation.
> *
> * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY
EXPRESSED OR IMPLIED
> * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES
> * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE
> * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE
FOUNDATION OR
> * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL,
> * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT
> * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF
> * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND
> * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY,
> * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
IN ANY WAY OUT
> * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF
> * SUCH DAMAGE.
> *
============================================================
========
> *
> * This software consists of voluntary contributions
made by many
> * individuals on behalf of the Apache Software
Foundation. For more
> * information on the Apache Software Foundation,
please see
> * <http://www.apache.org/>
;.
> *
> */
>
> package org.tigris.subversion.svnant;
>
> import java.io.File;
> import java.net.MalformedURLException;
> import java.text.DateFormat;
> import java.text.SimpleDateFormat;
> import java.util.Date;
>
> import org.apache.tools.ant.BuildException;
> import org.apache.tools.ant.Project;
> import
org.tigris.subversion.svnclientadapter.ISVNClientAdapter;
> import org.tigris.subversion.svnclientadapter.ISVNInfo;
> import
org.tigris.subversion.svnclientadapter.SVNClientException;
> import
org.tigris.subversion.svnclientadapter.SVNScheduleKind;
> import org.tigris.subversion.svnclientadapter.SVNUrl;
>
> /**
> * Display information about a local or remote item.
> *
> * author Rick Beton
> */
> public class Info extends SvnCommand {
>
> private String target = null;
>
> private String dateFormat = "yyyy-MM-dd HH:mm:ss
Z";
>
> private String pathProperty = null;
>
> private String uuidProperty = null;
>
> private String nodeKindProperty = null;
>
> private String scheduleProperty = null;
>
> private String propsLastUpdateProperty = null;
>
> private String revisionProperty = null;
>
> private String lastChangedRevisionProperty = null;
>
> private String lastChangedDateProperty = null;
>
> private String lastCommitAuthorProperty = null;
>
> private String urlProperty = null;
>
> /*
> * (non-Javadoc)
> *
> * see
org.tigris.subversion.svnant.SvnCommand#execute(org.tigris.s
ubversion.svnclientadapter.ISVNClientAdapter)
> */
> public void execute(ISVNClientAdapter svnClient)
throws BuildException {
> validateAttributes();
>
> log("Svn : Info");
>
> if (target == null) {
> target = ".";
> }
>
> final Project project = getProject();
> try {
> if (target.matches("^[a-z]+://")) {
> try {
> final ISVNInfo info = svnClient.getInfo(new
SVNUrl(target));
> extractInformation(project, info);
>
> } catch (MalformedURLException e) {
> throw new BuildException(
> "svn info target is a malformed url:
" + target, e);
> }
> } else {
> final ISVNInfo info = svnClient.getInfo(new
File(target));
> extractInformation(project, info);
> }
> } catch (SVNClientException e) {
> throw new BuildException("Can't get svn info
for " + target, e);
> }
> }
>
> /**
> * param project
> * param info
> */
> private void extractInformation(Project project, final
ISVNInfo info) {
>
> final DateFormat df = new
SimpleDateFormat(dateFormat);
> final String file = info.getFile().toString();
> final String uuid = info.getUuid();
> final SVNUrl statusUrl = info.getUrl();
> final String url = (statusUrl != null) ?
statusUrl.toString() : "";
> final String revision =
info.getRevision().toString();
> final String nodeKind =
info.getNodeKind().toString();
> final SVNScheduleKind scheduleKind =
info.getSchedule();
> final String schedule = (scheduleKind != null) ?
scheduleKind
> .toString() : "";
> final String lastDatePropsUpdate = extractDate(info
> .getLastDatePropsUpdate(), df);
> final String lastDateTextUpdate = extractDate(info
> .getLastDateTextUpdate(), df);
> final String lastChangedDate =
extractDate(info.getLastChangedDate(),
> df);
> String lastChangedRevision =
info.getLastChangedRevision().toString();
> String lastCommitAuthor = info.getLastCommitAuthor();
> if (lastCommitAuthor == null) {
> lastCommitAuthor = "";
> }
>
> log("Path: " + file,
Project.MSG_VERBOSE);
> log("URL: " + info.getUrl(),
Project.MSG_VERBOSE);
> log("Repository UUID: " + uuid,
Project.MSG_VERBOSE);
> log("Revision: " + revision,
Project.MSG_VERBOSE);
> log("Node Kind: " + nodeKind,
Project.MSG_VERBOSE);
> log("Schedule: " + schedule,
Project.MSG_VERBOSE);
> log("Last Changed Author: " +
lastCommitAuthor, Project.MSG_VERBOSE);
> log("Last Changed Rev: " +
lastChangedRevision, Project.MSG_VERBOSE);
> log("Last Changed Date: " +
lastChangedDate, Project.MSG_VERBOSE);
> log("Properties Last Updated: " +
lastDatePropsUpdate,
> Project.MSG_VERBOSE);
> log("Text Last Updated: " +
lastDateTextUpdate,
> Project.MSG_VERBOSE);
>
> if (pathProperty != null) {
> project.setProperty(pathProperty, file);
> }
>
> if (urlProperty != null) {
> project.setProperty(urlProperty, url);
> }
>
> if (uuidProperty != null) {
> project.setProperty(uuidProperty, uuid);
> }
>
> if (revisionProperty != null) {
> project.setProperty(revisionProperty, revision);
> }
>
> if (nodeKindProperty != null) {
> project.setProperty(nodeKindProperty, nodeKind);
> }
>
> if (scheduleProperty != null) {
> project.setProperty(scheduleProperty, schedule);
> }
>
> if (propsLastUpdateProperty != null) {
> project.setProperty(propsLastUpdateProperty,
lastDatePropsUpdate);
> }
>
> if (lastChangedRevisionProperty != null) {
> project.setProperty(lastChangedRevisionProperty,
> lastChangedRevision);
> }
>
> if (lastChangedDateProperty != null) {
> project.setProperty(lastChangedDateProperty,
lastChangedDate);
> }
>
> if (lastCommitAuthorProperty != null) {
> project.setProperty(lastCommitAuthorProperty,
lastCommitAuthor);
> }
> }
>
> private String extractDate(Date date, DateFormat
format) {
> if (date == null) {
> return "";
> }
> return format.format(date);
> }
>
> /**
> * Ensure we have a consistent and legal set of
attributes
> */
> protected void validateAttributes() throws
BuildException {
> }
>
> /**
> * param target
> * The path to set.
> */
> public void setTarget(String target) {
> this.target = target;
> }
>
> /**
> * param textStatusProperty
> * The textStatusProperty to set.
> */
> public void setUuidProperty(String textStatusProperty)
{
> this.uuidProperty = textStatusProperty;
> }
>
> /**
> * param propsLastUpdateProperty
> * The propsLastUpdateProperty to set.
> */
> public void setPropsLastUpdateProperty(String
propsLastUpdateProperty) {
> this.propsLastUpdateProperty =
propsLastUpdateProperty;
> }
>
> /**
> * param revisionProperty
> * The revisionProperty to set.
> */
> public void setRevisionProperty(String
revisionProperty) {
> this.revisionProperty = revisionProperty;
> }
>
> /**
> * param lastChangedRevisionProperty
> * The lastChangedRevisionProperty to set.
> */
> public void setLastChangedRevisionProperty(
> String lastChangedRevisionProperty) {
> this.lastChangedRevisionProperty =
lastChangedRevisionProperty;
> }
>
> /**
> * param lastChangedDateProperty
> * The lastChangedDateProperty to set.
> */
> public void setLastChangedDateProperty(String
lastChangedDateProperty) {
> this.lastChangedDateProperty =
lastChangedDateProperty;
> }
>
> /**
> * param lastCommitAuthorProperty.
> * The lastCommitAuthor to set.
> */
> public void setLastCommitAuthorProperty(String
lastCommitAuthorProperty) {
> this.lastCommitAuthorProperty =
lastCommitAuthorProperty;
> }
>
> /**
> * param urlProperty
> * The url to set.
> */
> public void setUrlProperty(String urlProperty) {
> this.urlProperty = urlProperty;
> }
>
> /**
> * param scheduleProperty
> * The scheduleProperty to set.
> */
> public void setScheduleProperty(String
scheduleProperty) {
> this.scheduleProperty = scheduleProperty;
> }
>
> }
> Svn
>
> by
>
> • Cédric Chabanois
>
> Description
>
> This task provide an interface to Subversion revision
control system that is a
> compelling replacement for CVS in the open source
community.
>
> Svn uses javahl (a java interface for the subversion
api) if it can find the
> corresponding library (svnjavahl.dll on windows).
Otherwise it uses svn command
> line interface.
>
> Parameters
>
> Attribute Description
Required
> username username that will be used for all nested svn
commands. No
> password password that will be used for all nested svn
commands. No
> javahl Set to “false” to use command line client
interface to svn No
> (experimental). Defaults to true
>
> Svn commands specified as nested elements
>
> add createRepository import mkdir revert
> cat delete info move status
> checkout diff keywordsset propdel switch
> commit export keywordsadd propget update
> copy ignore keywordsremove propset
>
> add
>
> You can add files and directories to svn repository
with nested <add> elements.
>
> Attribute Description
Required
> file file to add to the repository
No
> dir directory to add to the repository
No
> recurse Set to "false" to operate on a
single directory only No
> (applies only when dir attribute is set).
Default is "true"
>
> Parameters specified as nested elements :
>
> • fileset
> Filesets are used to select sets of files to add to
the repository.
> Note that directories needed to add selected files
will be added to the
> repository even if they are not selected by the
fileset.
>
> cat
>
> Get the content of a file on repository.
>
> Attribute Description
Required
> No
> destFile Name of the destination file
(default is the name of the
> file
on the url)
> url Url of the file in repository Yes
> revision to get.
> Possible values are :
> - a date with the following format : MM
> revision /DD/YYYY HH:MM AM_PM No
> - a revision number
> - HEAD, BASE, COMMITED or PREV
> Default is "HEAD"
>
> checkout
>
> Check out a working copy from a repository.
>
> Attribute Description
Required
> url url to checkout from
Yes
> recurse Set to "false" to operate on
single directory only. Default No
> is "true"
> destPath destination directory
Yes
> revision to checkout.
> Possible values are :
> revision - a date with the following format :
MM/DD/YYYY HH:MM AM_PM No
> - a revision number
> - HEAD, BASE, COMMITED or PREV
> Default is "HEAD"
>
> Parameters specified as nested elements :
>
> • fileset
> Filesets are used to select sets of files to add to
the repository.
> Note that directories needed to add selected files
will be added to the
> repository even if they are not selected by the
fileset.
>
> commit
>
> Send changes from your working copy to the repository.
>
> Attribute Description
Required
> file file to commit
No
> Set to "false" to operate on
single directory only. Default
> recurse is "true"
No
> Apply only when dir attribute is set.
> dir directory to commit
No
> message commit message
Yes
>
> Parameters specified as nested elements :
>
> • fileset
> Filesets are used to select sets of files to
commit.
>
> copy
>
> Duplicate something in working copy or repository,
remembering history.
> source and destination can each be either a working
copy (WC) path or URL:
>
> • WC->WC: copy and schedule for addition (with
history)
> • WC->URL: immediately commit a copy of WC to
URL
> • URL->WC: check out URL into WC, schedule for
addition
> • URL->URL: complete server-side copy; used to
branch & tag
>
> Attribute Description
Required
> srcPath source path
One of the two
> srcUrl source url
> testPath destination path
One of the two
> destUrl destination url
> message commit message
when destUrl is
>
set
> revision to copy from (when srcUrl is set)
> Possible values are :
> - a date with the following format :
MM/DD/YYYY
> revision HH:MM AM_PM
no
> - a revision number
> - HEAD, BASE, COMMITED or PREV
> Default is "HEAD"
>
> createRepository
>
> Create a new, empty repository at path.
>
> Attribute Description
Required
> path Path where to create the new repository Yes
>
> Example:
>
> <svn javahl="false">
> <createRepository
path="repository"/>
> </svn>
>
> delete
>
> If run on a working copy target, the item is scheduled
for deletion upon the
> next commit. Files, and directories that have not been
committed, are
> immediately removed from the working copy.
> The command will not remove targets that are, or
contain, unversioned or
> modified items; use the force attribute to override
this behaviour.
> If run on an url, the item is deleted from the
repository via an immediate
> commit.
>
> Attribute Description Required
> file file to delete No
> url url to delete No
> dir directory to delete No
> message commit message when url attribute is set
> force default is "false" No
>
> Parameters specified as nested elements :
>
> • fileset
> Filesets are used to select sets of files to
delete..
>
> diff
>
> Display the differences between two paths (oldPath and
newPath) or two urls
> (oldUrl and newUrl).
>
> Attribute Description
Required
> oldPath If oldUrl is not set, defaults to the
path '.' No
> oldUrl
No
> oldTargetRevision defaults to BASE or, if oldUrl is
set, to HEAD No
> newPath defaults to oldPath if oldUrl is not
set No
> newUrl
No
> newTargetRevision defaults to the current working
version or, if No
> newUrl is set, to HEAD
> outFile Default is 'patch'
No
> recurse Set to "false" to operate
on single directory only. No
> Default is "true"
>
> Example : diff between BASE and current working version
>
> <svn javahl="$">
> <diff
oldPath="workingcopy/diffTest/file.txt"
outFile="workingcopy/diffTest/patch.txt"/>
> </svn>
>
> export
>
> 1. Exports a clean directory tree from the repository
specified by srcurl, at
> revision revision if it is given, otherwise at
HEAD, into destPath.
> 2. Exports a clean directory tree from the working
copy specified by srcPath
> into destPath. all local changes will be
preserved, but files not under
> revision control will not be copied.
>
>
>
> Attribute Description
Required
> srcUrl source url to export from
One of the
>
two
> srcPath source path to export from
> destPath destination path
Yes
> revision of the source url to export from.
Defaults is
> "HEAD"
> Possible values are :
> revision - a date with the following format :
MM/DD/YYYY HH:MM No
> AM_PM
> - a revision number
> - HEAD, BASE, COMMITED or PREV
>
> ignore
>
> Add a given file or a pattern to the ignored files list
(modifies svn:ignore
> property)
>
> Attribute Description
Required
> file file to ignore
One of the
>
two
> dir directory on which we will update svn:ignore
property
> pattern pattern to add to svn:ignore on the directory
Yes
> Only when dir is set
> Set to "true" to add the pattern
recursively to
> recurse directories. Default is "false"
No
> Only when dir is set
>
> Example :
>
> <svn javahl="$">
> <ignore
dir="workingcopy/ignoreTest/dir1"
pattern="*.ignore"
recurse="true"/>
> </svn>
>
> import
>
> Commit an unversioned file or tree into the repository.
> Recursively commit a copy of path to url.
> If newEntry is not set, copy top-level contents of
pathintourldirectly.
> Otherwise, create newEntry underneath url and begin
copy there.
>
> Attribute Description
Required
> path source path to export from
Yes
> url source url to import to
Yes
> newEntry
No
> message commit message
Yes
> recurse Set to "false" to operate on
single directory only. Default False
> is "true"
>
> info
>
> Get information about a local or remote item.
>
> Attribute Description
Required
> target path of the file or
directory, or url of No
> remote resource
> pathProperty Name of the property to set
to the path of No
> the item
> urlProperty Name of the property to set
to the URL of No
> the item
> uuidProperty Name of the property to set
to the No
> repository UUID
> nodeKindProperty Name of the property to set
to the No
> target's node kind
> revisionProperty Name of the property to set
to the No
> revision of the target
> scheduleProperty Name of the property to set
to the No
> schedule of the target
> lastChangedRevisionProperty Name of the property to set
to the last No
> changed revision of the
target
> lastChangedDateProperty Name of the property to set
to the last No
> changed date of the target
> propsLastUpdateProperty Name of the property to set
to the last No
> changed date of the
target's properties
> lastCommitAuthorProperty Name of the property to set
to the last No
> commit author of the target
>
> If the target is unversioned, the properties are set to
a blank string ("").
>
> Example :
>
> <svn>
> <info target="."
>
revisionProperty="testStatus.revision"
>
propStatusProperty="testStatus.propStatus"
>
lastChangedRevisionProperty="testStatus.lastCommitRevi
sion"
>
lastCommitAuthorProperty="testStatus.lastCommitAuthor
">
> </svn>
>
> keywordsset
>
> Keywordsset controls which keywords will be substituted
on the given files.
> Valid keywords are:
>
> • URL, HeadURL : The URL for the head version of
the object.
> • Author, LastChangedBy : The last person to modify
the file.
> • Date, LastChangedDate : The date/time the object
was last modified.
> • Rev, LastChangedRevision : The last revision the
object changed.
> • Id : A compressed summary of the previous
>
> Attribute Description
Required
> file File for which keywords will be
substituted Either file,
>
dir or filesets
> dir All files in this directory will
have their Either file,
> keywords substituted (recursively)
dir or filesets
> keywords The keywords to substitute on the
given No
> files
> HeadURL/URL
> Author,
> LastChangedBy
> Date, Set to “true“ the keyword to
substitute it No
> LastChangedDate on the given file.
> Rev,
> LastChangedRevision
> Id
>
> Parameters specified as nested elements :
>
> • fileset
> Filesets are used to select sets of files on which
to apply keywords
> substitution.
>
> keywordsadd
>
> Keywordsadd add some keywords to be substituted on the
given files. Present
> keywords are not modified.
> The attributes are the same than for keywordsset
command.
>
> keywordsremove
>
> Keywordsadd remove some keywords to be substituted on
the given files. Other
> present keywords are not modified.
> The attributes are the same than for keywordsset
command.
>
> mkdir
>
> Create a new directory under revision control.
> If target is a working copy path the directory is
scheduled for addition in the
> working copy. If target is an url the directory is
created in the repository
> via an immediate commit.
> In both cases all the intermediate directories must
already exist.
>
> Attribute Description Required
> path path to create One of the two
> url url to create
> message commit message Yes
>
> move
>
> Move/rename something in working copy or repository.
>
> cource and destination can both be working copy (WC)
paths or URLs:
> WC -> WC: move and schedule for addition
(with history)
> URL -> URL: complete server-side rename.
>
> Attribute Description Required
> srcPath source path One of the two
> srcUrl source url
> destPath destination path One of the two
> destUrl destination url
> message commit message Yes
>
> propdel
>
> Remove a property from files or dirs.
>
> Attribute Description
Required
> path path of the file or directory on which to
delete the Yes
> property
> name name of the property to delete
Yes
> recurse if set, property will be removed recursively
No
>
> propget
>
> Get a property from a file or a directory.
>
> Attribute Description
Required
> path path of the file or directory on which to get
the Yes
> property
> name name of the property to get
Yes
> property the name of the property to set with the
value of the One of the
> svn property
two
> file file that will contain the value of the
property
>
> Example :
>
> <svn javahl="$">
> <propget
path="workingcopy/propTest/file.png"
name="svn:mime-type"
property="propTest.mimeType"/>
> </svn>
>
> propset
>
> Set a property on files or dirs.
>
> Attribute Description
Required
> path path of the file or directory on which to set
the Yes
> property
> name name of the property to set
Yes
> value the value of the property
One of the
> file the file that will be used as a value
two
> recurse if set, property will be set recursively
No
>
> Note:svn recognizes the following special versioned
properties but will store
> any arbitrary properties set:
>
> • svn:ignore : A newline separated list of file
patterns to ignore.
> • svn:keywords : Keywords to be expanded. Valid
keywords are:
> □ URL, HeadURL : The URL for the head version
of the object.
> □ Author, LastChangedBy : The last person to
modify the file.
> □ Date, LastChangedDate : The date/time the
object was last modified.
> □ Rev, LastChangedRevision : The last revision
the object changed.
> □ Id : A compressed summary of the previous 4
keywords.
> • svn:executable : If present, make the file
executable. This property cannot
> be set on a directory. A non-recursive attempt
will fail, and a recursive
> attempt will set the property only on the file
children of the directory
> • svn:eol-style : One of 'native', 'LF',
'CR', 'CRLF'.
> • svn:mime-type : The mimetype of the file. Used
to determine whether to
> merge the file, and how to serve it from Apache.
> A mimetype beginning with 'text/' (or an absent
mimetype) is treated as
> text. Anything else is treated as binary.
> • svn:externals : A newline separated list of
module specifiers, each of
> which consists of a relative directory path,
optional revision flags, and
> an URL. For example
> foo http://example.com/repos
/zig
> foo/bar -r 1234 http://example.com/repos
/zag
>
> revert
>
> Restore pristine working copy file (undo most local
edits).
>
> Attribute Description
Required
> file file to revert
No
> dir directory to revert
No
> recurse Set to "false" to operate on a
single directory only No
> (applies only when dir attribute is set).
Default is "false"
> revision. Defaults is "HEAD"
> Possible values are :
> revision - a date with the following format :
MM/DD/YYYY HH:MM AM_PM No
> - a revision number
> - HEAD, BASE, COMMITED or PREV
>
> Parameters specified as nested elements :
>
> • fileset
> Filesets are used to select sets of files to
revert.
>
> status
>
> Get the status of working copy files and directories.
>
> Attribute Description
Required
> path path of the file or
directory Yes
> textStatusProperty Name of the property to set
to the status No
> of the item
> propStatusProperty Name of the property to set
to the status No
> of the item properties
> Name of the property to set
to the
> revisionProperty revision of the item (or
“” if No
> unversioned)
> Name of the property to set
to the last
> lastChangedRevisionProperty changed revision of the
item (or “” if No
> unversioned)
> lastCommitAuthorProperty Name of the property to set
to the last No
> commit author (or “” if
unversioned)
> urlProperty Name of the property to set
to the url of No
> the item
>
> The value of TextStatusProperty can be :
>
> • non-svn
> • normal : no modifications
> • added
> • missing : item is missing (removed by non-svn
command)
> • incomplete
> • deleted
> • replaced
> • modified
> • merged
> • conflicted
> • obstructed
> • ignored
> • external
> • unversioned
>
> The value of propStatusProperty can be :
>
> • normal : no modifications
> • conflicted
> • modified
>
> Example :
>
> <svn>
> <status
path="workingcopy/statusTest/added.txt"
>
textStatusProperty="testStatus.textStatus"
>
propStatusProperty="testStatus.propStatus"
>
lastChangedRevisionProperty="testStatus.lastCommitRevi
sion"
>
revisionProperty="testStatus.revision"
>
lastCommitAuthorProperty="testStatus.lastCommitAuthor
">
> </svn>
>
> switch
>
> Update the working copy to mirror a new URL within the
repository. This
> behaviour is similar to 'svn update', and is the way
to move a working copy to
> a branch or tag within the same repository.
>
> Attribute Description
Required
> path The working copy to switch to the given url
Yes
> url The url to switch to
Yes
> recurse Set to "false" to operate on a
single directory only. No
> Default is "true"
> revision. Defaults is "HEAD"
> Possible values are :
> revision - a date with the following format :
MM/DD/YYYY HH:MM AM_PM No
> - a revision number
> - HEAD, BASE, COMMITED or PREV
>
> Example:
>
> <svn> <switch
path="workingcopy/switchTest"
url="$/switchTestBranch"/>
</svn>
>
> update
>
> Bring changes from the repository into the working
copy.
> If no revision given, bring working copy up-to-date
with HEAD rev. Else
> synchronize working copy to revision.
>
> Attribute Description
Required
> file file to update
No
> dir directory to update
No
> recurse Set to "false" to operate on a
single directory only No
> (applies only when dir attribute is set).
Default is "true"
> revision. Defaults is "HEAD"
> Possible values are :
> revision - a date with the following format :
MM/DD/YYYY HH:MM AM_PM No
> - a revision number
> - HEAD, BASE, COMMITED or PREV
>
> Parameters specified as nested elements :
>
> • fileset
> Filesets are used to select sets of files to
update.
>
> Examples
>
> Checkout a working copy from repository:
>
> <svn javahl="$">
> <checkout url="$"
destPath="workingcopy" />
> </svn>
>
> Delete some files from repository (and commit changes)
>
> <svn>
> <delete>
> <fileset
dir="workingcopy/deleteTest">
> <include
name="**/*.del"/>
> </fileset>
> </delete>
> <commit message="commit deleted
files" dir="workingcopy/deleteTest"/>
> </svn>
>
> Add my_repos/propTest to repository and set two
properties on file.png
> Subversion command line interface is used
(javahl="false").
>
> <svn>
> <add dir="workingcopy/propTest"/>
> <commit message="propTest added"
dir="workingcopy/propTest"/>
> <propset
path="workingcopy/propTest/file.png"
name="svn:mime-type"
value="image/png"/>
> <propset
path="workingcopy/propTest/file.png"
name="myPicture"
file="workingcopy/propTest/icon.gif"/>
> </svn>
>
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: dev-unsubscribe subclipse.tigris.org
> For additional commands, e-mail: dev-help subclipse.tigris.org
--
Daniel Rall
|