Browse Source

1) make sure that the -GTC flag on VSSGET only shows up when a timestamp has been set

2) make sure that if you have label="" you are not going to have -VL-L in the command line arguments


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274769 13f79535-47bb-0310-9956-ffa450edef68
master
Antoine Levy-Lambert 22 years ago
parent
commit
c82dc079d4
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java

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

@@ -377,7 +377,7 @@ public abstract class MSVSS extends Task implements MSVSSConstants {
* @return An empty string if label is not set.
*/
protected String getLabel() {
if (m_Label != null) {
if (m_Label != null && m_Label.length()>0) {
if (m_Label.length() > 31) {
String label = m_Label.substring(0, 30);
log("Label is longer than 31 characters, truncated to: " + label, Project.MSG_WARN);
@@ -418,7 +418,7 @@ public abstract class MSVSS extends Task implements MSVSSConstants {
// Use getLabel() so labels longer then 30 char are truncated
// and the user is warned
String label = getLabel();
if (! label.equals("")) {
if (! label.equals("") && label!=null) {
return FLAG_VERSION_LABEL + label;
}
}
@@ -617,7 +617,7 @@ public abstract class MSVSS extends Task implements MSVSSConstants {
*/
public String getFileTimeStamp() {
if (m_timestamp == null) {
return FLAG_FILETIME_DEF;
return "";
}
else if (m_timestamp.getValue().equals(TIME_MODIFIED)) {
return FLAG_FILETIME_MODIFIED;


Loading…
Cancel
Save