You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ju...@apache.org on 2002/11/08 22:29:35 UTC

cvs commit: jakarta-commons-sandbox/jrcs/src/java/org/apache/commons/jrcs/rcs Archive.java

juanco      2002/11/08 13:29:34

  Modified:    jrcs/src/java/org/apache/commons/jrcs/rcs Archive.java
  Log:
  Added method to retreive log message associated with a given revision.
  
  Submitted by:Kyrre Kristiansen [kyrre_kristiansen@yahoo.co.uk]
  Reviewed by:	juanco@apache.org
  
  Revision  Changes    Path
  1.4       +30 -1     jakarta-commons-sandbox/jrcs/src/java/org/apache/commons/jrcs/rcs/Archive.java
  
  Index: Archive.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jrcs/src/java/org/apache/commons/jrcs/rcs/Archive.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Archive.java	8 Oct 2002 19:06:24 -0000	1.3
  +++ Archive.java	8 Nov 2002 21:29:34 -0000	1.4
  @@ -1194,6 +1194,35 @@
   
           return (Node[]) result.toArray(new Node[result.size()]);
       }
  +    
  +    
  +    /** Returns the log message associated with the given revision.
  +     *  @param version - the version to get the log message for
  +     * 	@return the log message for the version.
  +     *  @exception - if the version does not exist for the archive.
  +     */
  +    public String getLog(Version version) 
  +            throws NodeNotFoundException
  +    {
  +        Node node = this.findNode(version);
  +        if (node == null) 
  +        {
  +            throw new NodeNotFoundException("There's no version " + version);
  +        }
  +        return node.getLog();
  +    }
  +
  +    /** Returns the log message associated with the given revision.
  +     *  @param version - the version to get the log message for
  +     * 	@return the log message for the version.
  +     *  @exception - if the version does not exist for the archive.
  +     */
  +    public String getLog(String vernum) 
  +            throws InvalidVersionNumberException, NodeNotFoundException
  +    {
  +        return getLog(new Version(vernum));
  +    }
  +
   }
   
   
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>