|
@@ -1,5 +1,5 @@ |
|
|
/* |
|
|
/* |
|
|
* Copyright 2003-2004 The Apache Software Foundation |
|
|
|
|
|
|
|
|
* Copyright 2003-2004, 2006 The Apache Software Foundation |
|
|
* |
|
|
* |
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
* you may not use this file except in compliance with the License. |
|
|
* you may not use this file except in compliance with the License. |
|
@@ -27,7 +27,6 @@ import org.apache.tools.ant.types.Commandline; |
|
|
* comment field doesn't include all options yet |
|
|
* comment field doesn't include all options yet |
|
|
*/ |
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* Performs a ClearCase Unlock command. |
|
|
* Performs a ClearCase Unlock command. |
|
|
* |
|
|
* |
|
@@ -70,7 +69,6 @@ import org.apache.tools.ant.types.Commandline; |
|
|
public class CCUnlock extends ClearCase { |
|
|
public class CCUnlock extends ClearCase { |
|
|
private String mComment = null; |
|
|
private String mComment = null; |
|
|
private String mPname = null; |
|
|
private String mPname = null; |
|
|
private String mObjselect = null; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* Executes the task. |
|
|
* Executes the task. |
|
@@ -115,20 +113,20 @@ public class CCUnlock extends ClearCase { |
|
|
/** |
|
|
/** |
|
|
* Check the command line options. |
|
|
* Check the command line options. |
|
|
*/ |
|
|
*/ |
|
|
private void checkOptions(Commandline cmd) { |
|
|
|
|
|
|
|
|
private void checkOptions(Commandline cmd) { |
|
|
// ClearCase items |
|
|
// ClearCase items |
|
|
getCommentCommand(cmd); |
|
|
getCommentCommand(cmd); |
|
|
|
|
|
|
|
|
if (getObjselect() == null && getPname() == null) { |
|
|
|
|
|
|
|
|
if (getObjSelect() == null && getPname() == null) { |
|
|
throw new BuildException("Should select either an element " |
|
|
throw new BuildException("Should select either an element " |
|
|
+ "(pname) or an object (objselect)"); |
|
|
+ "(pname) or an object (objselect)"); |
|
|
} |
|
|
} |
|
|
getPnameCommand(cmd); |
|
|
getPnameCommand(cmd); |
|
|
// object selector |
|
|
// object selector |
|
|
if (getObjselect() != null) { |
|
|
|
|
|
cmd.createArgument().setValue(getObjselect()); |
|
|
|
|
|
|
|
|
if (getObjSelect() != null) { |
|
|
|
|
|
cmd.createArgument().setValue(getObjSelect()); |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* Sets how comments should be written |
|
|
* Sets how comments should be written |
|
@@ -173,7 +171,7 @@ private void checkOptions(Commandline cmd) { |
|
|
* @param objselect objects to be locked |
|
|
* @param objselect objects to be locked |
|
|
*/ |
|
|
*/ |
|
|
public void setObjselect(String objselect) { |
|
|
public void setObjselect(String objselect) { |
|
|
mObjselect = objselect; |
|
|
|
|
|
|
|
|
setObjSelect(objselect); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
@@ -183,7 +181,7 @@ private void checkOptions(Commandline cmd) { |
|
|
* @since ant 1.6.1 |
|
|
* @since ant 1.6.1 |
|
|
*/ |
|
|
*/ |
|
|
public void setObjSel(String objsel) { |
|
|
public void setObjSel(String objsel) { |
|
|
mObjselect = objsel; |
|
|
|
|
|
|
|
|
setObjSelect(objsel); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
@@ -192,10 +190,9 @@ private void checkOptions(Commandline cmd) { |
|
|
* @return String containing the objects to be locked |
|
|
* @return String containing the objects to be locked |
|
|
*/ |
|
|
*/ |
|
|
public String getObjselect() { |
|
|
public String getObjselect() { |
|
|
return mObjselect; |
|
|
|
|
|
|
|
|
return getObjSelect(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* Get the 'comment' command |
|
|
* Get the 'comment' command |
|
|
* |
|
|
* |
|
@@ -246,7 +243,7 @@ private void checkOptions(Commandline cmd) { |
|
|
if (getPname() != null) { |
|
|
if (getPname() != null) { |
|
|
return getPname(); |
|
|
return getPname(); |
|
|
} else { |
|
|
} else { |
|
|
return getObjselect(); |
|
|
|
|
|
|
|
|
return getObjSelect(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|