Subclipse.unkrig.de: Difference between revisions

From unkrig.de
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 53: Line 53:
==== <code><diff></code> ====
==== <code><diff></code> ====


:(To be documented)
:Representation of a [http://svnbook.red-bean.com/en/1.7/svn.ref.svn.c.diff.html svn diff] subcommand.


;<code><diffSummarize></code>
:;Attributes
:(To be documented)
 
::;<code>oldFile="''path''"</code> or <code>oldDir="''path''"</code>
:::To be documented.
 
::;<code>oldFileRevision="''rev''"</code>
:::To be documented.
 
::;<code>newFile="''path''"</code> or <code>newDir="''path''"</code>
:::To be documented.
 
::;<code>newFileRevision="''rev''"</code>
:::To be documented.
 
::;<code>url="''url''"</code>
:::To be documented.
 
::;<code>pegRevision="''rev''"</code>
:::To be documented.
 
::;<code>startRevision="''rev''"</code>
:::To be documented.
 
::;<code>endRevision="''rev''"</code>
:::To be documented.
 
::;<code>oldUrl="''url''"</code>
:::To be documented.
 
::;<code>oldUrlRevision="''rev''"</code>
:::To be documented.
 
::;<code>newUrl="''url''"</code>
:::To be documented.
 
::;<code>newUrlRevision="''rev''"</code>
:::To be documented.
 
::;<code>outFile="''path''"</code>
:::To be documented.
 
::;<code>recurse="true|false"</code>
:::To be documented.
 
::;<code>ignoreAncestry="true|false"</code>
:::To be documented.
 
::;<code>noDiffDeleted="true|false"</code>
:::To be documented.
 
::;<code>force="true|false"</code>
:::To be documented.


==== <code><export></code> ====
==== <code><export></code> ====

Revision as of 18:08, 21 September 2015

Introduction

This ECLIPSE plug-in adds an additional ANT task 'de.unkrig.subclipse.svn' which is available in ANT builds which have the option 'Run in the same JRE as the workspace' set.

The ANT task uses the SVN client that is provided by the SUBCLIPSE plug-in. Thus no configuration is required, because it is re-used from SUBCLIPSE.

Download and Installation

Within ECLIPSE, download and install the feature from the update site

http://subclipse.unkrig.de/update

The change log is available here.

Task Descriptions

Task <de.unkrig.subclipse.svn>

Executes a series of SVN commands.

Attributes

(None.)

Subelements

The subelements of this task represent SVN subcommands which are executed sequentially:

<copy>

Representation of an svn copy subcommand.
Attributes
url="url" or file="path" or dir="path"
File or directory to copy (resource collection subelements are an alternative to specify multiple source files; see below).
toUrl="url" or toFile="path" or toDir="path"
Where to copy the file(s) (must be an existing directory iff multiple source files are specified).
message="text"
revision="rev"
pegRevision="rev"
copyAsChild="boolean"
makeParents="boolean"
See the SVN documentation of the svn copy subcommand.
Subelements
Resource collections (e.g. <fileset>, <dirset>, ...)
An alternative to the srcUrl="url" and srcPath="path" attributes to specify multiple source files.

<diff>

Representation of a svn diff subcommand.
Attributes
oldFile="path" or oldDir="path"
To be documented.
oldFileRevision="rev"
To be documented.
newFile="path" or newDir="path"
To be documented.
newFileRevision="rev"
To be documented.
url="url"
To be documented.
pegRevision="rev"
To be documented.
startRevision="rev"
To be documented.
endRevision="rev"
To be documented.
oldUrl="url"
To be documented.
oldUrlRevision="rev"
To be documented.
newUrl="url"
To be documented.
newUrlRevision="rev"
To be documented.
outFile="path"
To be documented.
recurse="true|false"
To be documented.
ignoreAncestry="true|false"
To be documented.
noDiffDeleted="true|false"
To be documented.
force="true|false"
To be documented.

<export>

Representation of an svn export subcommand.
Attributes
url="url" or file="path" or dir="path"
File or directory to export.
toFile="path" or toDir="path"
Where to export the file or directory to.
revision="rev"
See the documentation of the svn export subcommand.
force="boolean"
Whether to overwrite existing files.

<import>

Representation of an svn import subcommand.
Attributes
file="path" or dir="path"
File or directory to import.
url="url"
Destination repository location.
message="text"
recurse="boolean"
See the documentation of the svn import subcommand.

<list>

Representation of an svn list subcommand.
Attributes
url="url" or file="file" or dir="dir"
The URL or working copy file or working copy directory to list.
revision="revision|HEAD", pegRevision="revision|HEAD"
The revision of the URL or file or directory to list.
recurse="true|false"
Whether to continue when some of the <perDirEntry> sequences fail.
attributeNamePrefix="string"
See <perDirEntry>, below.
keepGoing="true|false"
Whether to descend recursively.
Subelements
<perDirEntry>
Contains a sequence of tasks that is executed for listed entry. The following attributes are substituted within the tasks:
@{hasProps}
Whether the entry has SVN properties
@{lastChangeDate}
When the entry was last changed
@{lastChangedRevision}
The last committed revision
@{lastCommitAuthor}
The user who committed this entry last
@{nodeKind}
The node's kind ("file" or "directory")
@{path}
The (relative) path of the entry
@{size}
The file size in bytes
If attributeNamePrefix="string" is configured, then the described attribute names are prefixed with the given string. This is particularly useful for nested <list> commands.
See the documentation of the svn list subcommand.

<log>

(To be documented)

<mkdir>

Representation of an svn mkdir subcommand.
Attributes
url="url"
message="text"
makeParents="boolean"
See the documentation of the svn mkdir subcommand.

Other SVN subcommands

<addDirectory>
<addFile>
<addKeywords>
<annotate>
<checkout>
<commit>
<createPatch>
<createRepository>
<getProperties>
<getRevProperties>
<lock>
<merge>
<move>
<relocate>
<remove>
<revert>
<unlock>
<update>

These subelements exist, but merely issue an "Not yet implemented" error when executed.

Example

Tagging projects in SVN:

<!-- Verify that ANT is running in the same JVM as ECLIPSE. -->
<fail
    unless="eclipse.running"
    message="Please activate the ECLIPSE external tool configuration option 'Run in the same JRE as the workspace' and re-run."
/>

<!-- Verify that the 'de.unkrig.subclipse' plugin is available. -->
<fail message="Please install the 'de.unkrig.subclipse' ECLIPSE feature and re-run.">
    <condition><not><typefound name="de.unkrig.subclipse.svn" /></not></condition>
</fail>

<property name="d" value="http://svn.acme.com/svn/MyRepo/tags/${tag}"/>
<de.unkrig.subclipse.svn>
    <mkdir                          url="${d}"/>
    <copy srcpath="."           desturl="${d}"/>
    <copy srcpath="../project2" desturl="${d}"/>
</de.unkrig.subclipse.svn>

If you like loading ANT tasks in separate XML namespaces, you can alternatively write:

<some-enclosing-tag-e-g-project-or-target xmlns:unkrig="antlib:de.unkrig.subclipse">
    ...
    <fail
        unless="eclipse.running"
        message="Please activate the ECLIPSE external tool configuration option 'Run in the same JRE as the workspace' and re-run."
    />

    <fail message="Please install the 'de.unkrig.subclipse' ECLIPSE feature and re-run.">
        <condition><not><typefound uri="antlib:de.unkrig.subclipse" name="svn" /></not></condition>
    </fail>

    <unkrig:svn>...

, where "unkrig" is the (arbitrary) XML namespace prefix.

License

SUBCLIPSE.UNKRIG.DE is published under the "New BSD License".

Source Code

Source code is available via SVN on

https://svn.code.sf.net/p/loggifier/code

. From that repository, check out the projects

  • de.unkrig.checkstyle-configuration
  • de.unkrig.commons.nullanalysis
  • de.unkrig.subclipse_dist
  • de.unkrig.subclipse.ant.tasks
  • de.unkrig.subclipse.branding
  • de.unkrig.subclipse.core
  • org.apache.ant-1.8.4

, or, if you are using ECLIPSE, just import https://svn.code.sf.net/p/loggifier/code/trunk/de.unkrig.subclipse_dist/projectSet.psf.

Contact

For bugs, improvements, complaints, or any other kind of feedback, send email to arno@subclipse.unkrig.de.