DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10676>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10676

pvcs does not create the path while getting the latest version

           Summary: pvcs does not create the path while getting the latest
                    version
           Product: Ant
           Version: 1.4.1
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Optional Tasks
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


While creating the folders, pvcs createfolders checks only whether the line 
starts with "\  or "/ , but at our place the the line start with "Q:\ .

So a solution is needed to check, if the line starts with a drive letter.



So I made some changes to pvcs.java, to fix this for us. 

I modified createFolders()
=========================================================

<snip>
    private void createFolders(File file) throws IOException, ParseException {
        BufferedReader in = new BufferedReader(new FileReader(file));
        MessageFormat mf = new MessageFormat("{0}-arc({1})");
        String line = in.readLine();
        while(line != null) {
            log("Considering \""+line+"\"", Project.MSG_VERBOSE);
            if (    line.startsWith("\"\\") 
                       || line.startsWith("\"/")
                       || isDOSPathFormat(line) ) {
</snip>



and inserted isDOSPathFormat()
=========================================================
/**
 * Checks, if the given line starts with a dos formatted filename.<br>
 * Return true, when line starts with "(driveletter):\ where (driveletter)
 * is a letter between 'a' and 'z'.
 * 
 * @author jfriebel
 * @since (11.07.2002 08:20:09)
 * @return boolean true when line starts with a dos formatted filename.
 * @param aLine:String a line extracted from the pvcs log file
 */
public boolean isDOSpathformat(String aLine) {

        if (    aLine!=null 
                   && aLine.charAt(0)=='\"'
                   && (    (  aLine.charAt(1)>='A' && aLine.charAt(1)<='Z' )
                              || (  aLine.charAt(1)>='a' && aLine.charAt(1)
<='z' ) )
                   && aLine.charAt(2)==':'
                   && ( aLine.charAt(3)=='\\' || aLine.charAt(3)=='/' ) )
                return true;
        
        return false;
}

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to