ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/vss MSVSSLABEL.java
Date Sun, 29 Apr 2001 16:13:55 GMT
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 <jon.skeet@peramon.com>
  
  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
  +     * <p>
  +     * 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;
  +    }
   }
  
  
  

Mime
View raw message