@@ -69,7 +69,7 @@ import org.apache.tools.ant.DirectoryScanner;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.types.FileSet;
import org.apache.tools.ant.types.FileSet;
/**
/**
* P4Fstat - find out which files are under Perforce control and which are not.
* P4Fstat - find out which files are under Perforce control and which are not.
*
*
* <br><b>Example Usage:</b><br>
* <br><b>Example Usage:</b><br>
@@ -86,6 +86,8 @@ import org.apache.tools.ant.types.FileSet;
* @author <A HREF="mailto:miha@softhome.net">Miha</A>
* @author <A HREF="mailto:miha@softhome.net">Miha</A>
* @author <A HREF="mailto:leslie.hughes@rubus.com">Les Hughes</A>
* @author <A HREF="mailto:leslie.hughes@rubus.com">Les Hughes</A>
* @author <A HREF="mailto:ashundi@tibco.com">Anli Shundi</A>
* @author <A HREF="mailto:ashundi@tibco.com">Anli Shundi</A>
*
* @ant.task category="scm"
*/
*/
public class P4Fstat extends P4Base {
public class P4Fstat extends P4Base {
@@ -103,9 +105,9 @@ public class P4Fstat extends P4Base {
private int doneFileNum = 0;
private int doneFileNum = 0;
private boolean debug = false;
private boolean debug = false;
private static final String EXISTING_HEADER
private static final String EXISTING_HEADER
= "Following files exist in perforce";
= "Following files exist in perforce";
private static final String NONEXISTING_HEADER
private static final String NONEXISTING_HEADER
= "Following files do not exist in perforce";
= "Following files do not exist in perforce";
@@ -117,7 +119,7 @@ public class P4Fstat extends P4Base {
} else if (filter.equalsIgnoreCase("non-existing")) {
} else if (filter.equalsIgnoreCase("non-existing")) {
show = SHOW_NON_EXISTING;
show = SHOW_NON_EXISTING;
} else {
} else {
throw new BuildException("P4Fstat: ShowFilter should be one of: "
throw new BuildException("P4Fstat: ShowFilter should be one of: "
+ "all, existing, non-existing");
+ "all, existing, non-existing");
}
}
}
}
@@ -125,7 +127,7 @@ public class P4Fstat extends P4Base {
public void setChangelist(int changelist) throws BuildException {
public void setChangelist(int changelist) throws BuildException {
if (changelist <= 0) {
if (changelist <= 0) {
throw new BuildException("P4FStat: Changelist# should be a "
throw new BuildException("P4FStat: Changelist# should be a "
+ "positive number");
+ "positive number");
}
}
@@ -203,7 +205,7 @@ public class P4Fstat extends P4Base {
private void execP4Fstat(StringBuffer list) {
private void execP4Fstat(StringBuffer list) {
if (debug) {
if (debug) {
log("Executing fstat " + P4CmdOpts + " " + addCmd + list + "\n",
log("Executing fstat " + P4CmdOpts + " " + addCmd + list + "\n",
Project.MSG_INFO);
Project.MSG_INFO);
}
}
execP4Command("fstat " + P4CmdOpts + " " + addCmd + list, handler);
execP4Command("fstat " + P4CmdOpts + " " + addCmd + list, handler);