History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: SCM-184
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Mike Perham
Reporter: John Didion
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Maven SCM

PerforceScmProvider.createClientspec should use the working dir's canonical path for the clientspec root

Created: 10/Apr/06 05:31 PM   Updated: 08/Jun/06 09:03 AM
Component/s: maven-scm-provider-perforce
Affects Version/s: 1.0-beta-4
Fix Version/s: 1.0-beta-4

Time Tracking:
Not Specified

Complexity: Intermediate


 Description  « Hide
createClientspec should look like this:
    public static String createClientspec( PerforceScmProviderRepository repo, String specname, File workDir )
    {
        String clientspecName = getClientspecName( repo, workDir );
        String userName = getUsername( repo );
        String rootDir = null;
        try {
            rootDir = workDir.getCanonicalPath();
        } catch (IOException ex) {
            //getLogger().error("Error getting canonical path for working directory: " + workDir, ex);
            rootDir = workDir.getAbsolutePath();
        }

        StringBuffer buf = new StringBuffer();
        buf.append( "Client: " ).append( clientspecName ).append( NEWLINE );
        buf.append( "Root: " ).append( rootDir ).append( NEWLINE );
        buf.append( "Owner: " ).append( userName ).append( NEWLINE );
        buf.append( "View:" ).append( NEWLINE );
        buf.append( "\t" ).append( PerforceScmProvider.getCanonicalRepoPath( repo.getPath() ) );
        buf.append( " //" ).append( clientspecName ).append( "/..." ).append( NEWLINE );
        buf.append( "Description:" ).append( NEWLINE );
        buf.append( "\t" ).append( "Created by maven-scm-provider-perforce" ).append( NEWLINE );
        return buf.toString();
    }

Otherwise, when used with continuum, the changelog command will never work. The continuum working directory always looks like CONTINUUM_HOME/bin/win32/../../apps/depot/69 when creating the clientspec, and perforce seems not to know how to deal with non-canonical paths, so perforce always just spits out an error message and returns no changes. This sucks because then build complete notifications never get sent.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Mike Perham - 08/Jun/06 09:02 AM
Thanks John.