You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by um...@apache.org on 2002/02/02 18:01:25 UTC
cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/pvcs Pvcs.java
umagesh 02/02/02 09:01:25
Modified: src/main/org/apache/tools/ant/taskdefs/optional/pvcs
Pvcs.java
Log:
Add -id option
PR: 4572
Submitted by: Steven E. Newton (snewton@io.com)
Revision Changes Path
1.8 +27 -12 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/pvcs/Pvcs.java
Index: Pvcs.java
===================================================================
RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/pvcs/Pvcs.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- Pvcs.java 10 Jan 2002 13:59:38 -0000 1.7
+++ Pvcs.java 2 Feb 2002 17:01:25 -0000 1.8
@@ -2,7 +2,7 @@
*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2001 The Apache Software Foundation. All rights
+ * Copyright (c) 2001-2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -87,10 +87,10 @@
* and supports file names with <i>()</i>. Thanks to Erik Husby for
* bringing the bug to my attention.
*
- * <b>27-04-2001</b> <p>UNC paths are now handled properly.
+ * <b>27-04-2001</b> <p>UNC paths are now handled properly.
* Fix provided by Don Jeffery. He also added an <i>UpdateOnly</i> flag
- * that, when true, conditions the PVCS get using the -U option to only
- * update those files that have a modification time (in PVCS) that is newer
+ * that, when true, conditions the PVCS get using the -U option to only
+ * update those files that have a modification time (in PVCS) that is newer
* than the existing workfile.
*
* @author <a href="mailto:tchristensen@nordija.com">Thomas Christensen</a>
@@ -110,6 +110,7 @@
private boolean updateOnly;
private String filenameFormat;
private String lineStart;
+ private String userId;
/**
* Constant for the thing to execute
*/
@@ -160,7 +161,7 @@
Project aProj = getProject();
int result = 0;
- if(repository == null || repository.trim().equals("")) {
+ if(repository == null || repository.trim().equals("")) {
throw new BuildException("Required argument repository not specified");
}
@@ -179,6 +180,12 @@
}
commandLine.createArgument().setValue("-pr"+getRepository());
+ String uid = getUserId();
+
+ if (uid != null) {
+ commandLine.createArgument().setValue("-id" + uid);
+ }
+
// default pvcs project is "/"
if(getPvcsproject() == null && getPvcsprojects().isEmpty()) {
pvcsProject = "/";
@@ -281,8 +288,8 @@
String line = in.readLine();
while(line != null) {
log("Considering \""+line+"\"", Project.MSG_VERBOSE);
- if(line.startsWith("\"\\") ||
- line.startsWith("\"/") ||
+ if(line.startsWith("\"\\") ||
+ line.startsWith("\"/") ||
line.startsWith(getLineStart()) ) {
Object[] objs = mf.parse(line);
String f = (String)objs[1];
@@ -301,7 +308,7 @@
log(dir.getAbsolutePath() + " exists. Skipping", Project.MSG_VERBOSE);
}
} else {
- log("File separator problem with " + line,
+ log("File separator problem with " + line,
Project.MSG_WARN);
}
} else {
@@ -401,7 +408,7 @@
}
/**
- * Get name of the PVCS bin directory
+ * Get name of the PVCS bin directory
* @return String
*/
public String getPvcsbin() {
@@ -446,7 +453,7 @@
/**
* Specifies the name of the promotiongroup argument
- * @param repo String
+ * @param repo String
*/
public void setPromotiongroup(String w) {
promotiongroup=w;
@@ -462,7 +469,7 @@
/**
* Specifies the name of the label argument
- * @param repo String
+ * @param repo String
*/
public void setLabel(String l) {
label=l;
@@ -477,7 +484,7 @@
}
/**
- * If set to true the return value from executing the pvcs
+ * If set to true the return value from executing the pvcs
* commands are ignored.
*/
public void setIgnoreReturnCode(boolean b) {
@@ -502,6 +509,14 @@
*/
public void setUpdateOnly(boolean l) {
updateOnly = l;
+ }
+
+ public String getUserId() {
+ return userId;
+ }
+
+ public void setUserId(String u) {
+ userId = u;
}
/**
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>