Return-Path: Delivered-To: apmail-jakarta-ant-dev-archive@jakarta.apache.org Received: (qmail 38051 invoked by uid 500); 29 Apr 2001 16:13:56 -0000 Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk Reply-To: ant-dev@jakarta.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 37954 invoked by uid 500); 29 Apr 2001 16:13:55 -0000 Delivered-To: apmail-jakarta-ant-cvs@apache.org Date: 29 Apr 2001 16:13:55 -0000 Message-ID: <20010429161355.37885.qmail@apache.org> From: nico@apache.org To: jakarta-ant-cvs@apache.org Subject: cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/vss MSVSSLABEL.java nico 01/04/29 09:13:55 Modified: src/main/org/apache/tools/ant/taskdefs/optional/vss MSVSSLABEL.java Log: vsslabel now allows to specify a comment for the label. Submitted by: Jon Skeet Revision Changes Path 1.2 +23 -2 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSLABEL.java Index: MSVSSLABEL.java =================================================================== RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSLABEL.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- MSVSSLABEL.java 2001/01/11 11:21:42 1.1 +++ MSVSSLABEL.java 2001/04/29 16:13:53 1.2 @@ -102,6 +102,7 @@ private String m_Label = null; private String m_Version = null; + private String m_Comment = "-"; public static final String FLAG_LABEL = "-L"; @@ -137,8 +138,7 @@ commandLine.createArgument().setValue(getVsspath()); // -C - // Use the same comment for all labels - // Not required + commandLine.createArgument().setValue("-C"+getComment()); // -I- commandLine.createArgument().setValue("-I-"); // ignore all errors @@ -222,4 +222,25 @@ return m_Label; } + /** + * Set the comment to apply in SourceSafe + *

+ * If this is null or empty, it will be replaced with "-" which + * is what SourceSafe uses for an empty comment. + */ + public void setComment(String comment) { + if ( comment.equals("") || comment.equals("null") ) { + m_Comment = "-"; + } else { + m_Comment = comment; + } + } + + /** + * Gets the comment to be applied. + * @return the comment to be applied. + */ + public String getComment() { + return m_Comment; + } }