ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 4346] New: - The optional pvcs task does not work in windows unless the directory structure is already created
Date Mon, 22 Oct 2001 19:15:26 GMT
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=4346>.
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=4346

The optional pvcs task does not work in windows unless the directory structure is already
created

           Summary: The optional pvcs task does not work in windows unless
                    the directory structure is already created
           Product: Ant
           Version: 1.4.1
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Optional Tasks
        AssignedTo: ant-dev@jakarta.apache.org
        ReportedBy: franqueli@hotmail.com


The code assumes that we are working with pvcs in a unix environment(actually 
that we are not using a mapped drive to point to the db eg. not p:\PVCSdb) and 
therefore does not create the folder structure we need to check out files to.
I have included code below that will solve the problem. Feel free to use it.


private void createFolders(File file) throws IOException, ParseException
    {
        BufferedReader in = new BufferedReader(new FileReader(file));
        MessageFormat mf = new MessageFormat("{0}-arc({1})");
        for(String line = in.readLine(); line != null; line = in.readLine())
        {
            log("Considering \"" + line + "\"", 3);
            String colon = line.charAt(2) + ""; //does the path have a colon
            //check to see if this path is a windows directory
//If so remove the leading " and driveletter so we won't have todo
//line.startsWith("\"e:") ... for every possible mapped drive
            if(colon.equals(":")){
                log("It was a : we are in windows", 2);
                line = line.substring(2);
            }   
                        
            if(line.startsWith("\"\\") || line.startsWith("\"/") || 
line.startsWith(":\\"))
            { //same as old method

Mime
View raw message