Browse Source

adding category to Perforce tasks

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273975 13f79535-47bb-0310-9956-ffa450edef68
master
Erik Hatcher 22 years ago
parent
commit
15ebfccec9
12 changed files with 39 additions and 19 deletions
  1. +5
    -3
      src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Add.java
  2. +3
    -3
      src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Base.java
  3. +3
    -2
      src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Change.java
  4. +4
    -2
      src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Counter.java
  5. +3
    -1
      src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Delete.java
  6. +6
    -4
      src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Edit.java
  7. +2
    -0
      src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Have.java
  8. +5
    -3
      src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Label.java
  9. +3
    -1
      src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Reopen.java
  10. +2
    -0
      src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Revert.java
  11. +1
    -0
      src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Submit.java
  12. +2
    -0
      src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Sync.java

+ 5
- 3
src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Add.java View File

@@ -51,7 +51,7 @@
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
/*
/*
* Portions of this software are based upon public domain software
* originally written at the National Center for Supercomputing Applications,
* University of Illinois, Urbana-Champaign.
@@ -79,6 +79,8 @@ import org.apache.tools.ant.types.FileSet;
*
* @author <A HREF="mailto:leslie.hughes@rubus.com">Les Hughes</A>
* @author <A HREF="mailto:ashundi@tibco.com">Anli Shundi</A>
*
* @ant.task category="scm"
*/
public class P4Add extends P4Base {

@@ -89,11 +91,11 @@ public class P4Add extends P4Base {

/**
* positive integer specifying the maximum length
* of the commandline when calling Perforce to add the files.
* of the commandline when calling Perforce to add the files.
* Defaults to 450, higher values mean faster execution,
* but also possible failures.
*/
public void setCommandlength(int len) throws BuildException {
if (len <= 0) {
throw new BuildException("P4Add: Commandlength should be a positive number");


+ 3
- 3
src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Base.java View File

@@ -108,7 +108,7 @@ public abstract class P4Base extends org.apache.tools.ant.Task {
protected String P4CmdOpts = "";

//Setters called by Ant
/**
* The p4d server and port to connect to;
* optional, default "perforce:1666"
@@ -152,13 +152,13 @@ public abstract class P4Base extends org.apache.tools.ant.Task {
/**
* Set extra command options; only used on some
* of the Perforce tasks.
*/
*/
public void setCmdopts(String P4CmdOpts) {
this.P4CmdOpts = P4CmdOpts;
}

/**
* whether to stop the build (true, default)
* whether to stop the build (true, default)
* or keep going if an error is returned from the p4 command
*/
public void setFailonerror(boolean fail) {


+ 3
- 2
src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Change.java View File

@@ -62,17 +62,18 @@ package org.apache.tools.ant.taskdefs.optional.perforce;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;

/**
/**
* Requests a new changelist from the Perforce server.
* P4Change creates a new changelist in perforce. P4Change sets the property
* ${p4.change} with the new changelist number. This should then be passed into
* p4edit and p4submit.
*
*
*
* @see P4Edit
* @see P4Submit
* @author <A HREF="mailto:leslie.hughes@rubus.com">Les Hughes</A>
*
* @ant.task category="scm"
*/
public class P4Change extends P4Base {



+ 4
- 2
src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Counter.java View File

@@ -62,7 +62,7 @@ package org.apache.tools.ant.taskdefs.optional.perforce;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;

/**
/**
* Obtains or sets the value of a counter.
*
* <p> When used in its base form
@@ -77,10 +77,12 @@ import org.apache.tools.ant.Project;
* The user performing this task must have Perforce &quot;review&quot; permissions
* as defined by Perforce protections in order for this task to succeed.
</P>
* Example Usage:<br>
* &lt;p4counter name="${p4.counter}" property=${p4.change}"/&gt;
* @author <a href="mailto:kirk@radik.com">Kirk Wylie</a>
*
* @ant.task category="scm"
*/

public class P4Counter extends P4Base {


+ 3
- 1
src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Delete.java View File

@@ -66,6 +66,8 @@ import org.apache.tools.ant.BuildException;
* (See also {@link P4Edit P4Edit})?<br>
*
* @author <A HREF="mailto:mike@tmorph.com">Mike Roberts</A>, <A HREF="mailto:leslie.hughes@rubus.com">Les Hughes</A>
*
* @ant.task category="scm"
*/
public class P4Delete extends P4Base {

@@ -74,7 +76,7 @@ public class P4Delete extends P4Base {
/**
* An existing changelist number for the deletion; optional
* but strongly recommended.
*/
*/
public void setChange(String change) {
this.change = change;
}


+ 6
- 4
src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Edit.java View File

@@ -61,17 +61,19 @@ package org.apache.tools.ant.taskdefs.optional.perforce;

import org.apache.tools.ant.BuildException;

/**
* Open file(s) for edit.
/**
* Open file(s) for edit.
* P4Change should be used to obtain a new changelist for P4Edit as,
* although P4Edit can open files to the default change,
* although P4Edit can open files to the default change,
* P4Submit cannot yet submit to it.
* Example Usage:<br>
* &lt;p4edit change="${p4.change}" view="//depot/project/foo.txt" /&gt;
*
*
* @author <A HREF="mailto:leslie.hughes@rubus.com">Les Hughes</A>
*
* @todo Should call reopen if file is already open in one of our changelists perhaps?
*
* @ant.task category="scm"
*/

public class P4Edit extends P4Base {


+ 2
- 0
src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Have.java View File

@@ -67,6 +67,8 @@ import org.apache.tools.ant.BuildException;
* P4Have simply dumps the current file version info into
* the Ant log (or stdout).
* @author <A HREF="mailto:leslie.hughes@rubus.com">Les Hughes</A>
*
* @ant.task category="scm"
*/
public class P4Have extends P4Base {



+ 5
- 3
src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Label.java View File

@@ -77,6 +77,8 @@ import org.apache.tools.ant.util.StringUtils;
* </pre>
*
* @author <A HREF="mailto:leslie.hughes@rubus.com">Les Hughes</A>
*
* @ant.task category="scm"
*/
public class P4Label extends P4Base {

@@ -120,7 +122,7 @@ public class P4Label extends P4Base {
}

if (desc == null || desc.length() < 1) {
log("Label Description not set, assuming 'AntLabel'",
log("Label Description not set, assuming 'AntLabel'",
Project.MSG_WARN);
desc = "AntLabel";
}
@@ -130,7 +132,7 @@ public class P4Label extends P4Base {
}

if (name == null || name.length() < 1) {
SimpleDateFormat formatter
SimpleDateFormat formatter
= new SimpleDateFormat("yyyy.MM.dd-hh:mm");
Date now = new Date();
name = "AntLabel-" + formatter.format(now);
@@ -162,7 +164,7 @@ public class P4Label extends P4Base {
});


log("Created Label " + name + " (" + desc + ") with view:\n" + P4View,
log("Created Label " + name + " (" + desc + ") with view:\n" + P4View,
Project.MSG_INFO);

//Now lock if required


+ 3
- 1
src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Reopen.java View File

@@ -61,10 +61,12 @@ package org.apache.tools.ant.taskdefs.optional.perforce;

import org.apache.tools.ant.BuildException;

/*
/**
* Reopen Perforce checkout files between changelists.
*
* @author <A HREF="mailto:leslie.hughes@rubus.com">Les Hughes</A>
*
* @ant.task category="scm"
*/
public class P4Reopen extends P4Base {



+ 2
- 0
src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Revert.java View File

@@ -65,6 +65,8 @@ import org.apache.tools.ant.BuildException;
* Revert Perforce open files or files in a changelist
*
* @author <A HREF="mailto:leslie.hughes@rubus.com">Les Hughes</A>
*
* @ant.task category="scm"
*/
public class P4Revert extends P4Base {



+ 1
- 0
src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Submit.java View File

@@ -74,6 +74,7 @@ import java.util.Vector;
*
* @author <A HREF="mailto:leslie.hughes@rubus.com">Les Hughes</A>
*
* @ant.task category="scm"
*/
public class P4Submit extends P4Base {



+ 2
- 0
src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Sync.java View File

@@ -79,6 +79,8 @@ import org.apache.tools.ant.Project;
* @todo Add decent label error handling for non-exsitant labels
*
* @author <A HREF="mailto:leslie.hughes@rubus.com">Les Hughes</A>
*
* @ant.task category="scm"
*/
public class P4Sync extends P4Base {



Loading…
Cancel
Save