Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.0-beta-4
-
None
Description
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.