[ http://jira.codehaus.org/browse/SCM-184?page=all ]
Mike Perham closed SCM-184:
---------------------------
Resolution: Fixed
Thanks John.
> PerforceScmProvider.createClientspec should use the working dir's canonical
> path for the clientspec root
> --------------------------------------------------------------------------------------------------------
>
> Key: SCM-184
> URL: http://jira.codehaus.org/browse/SCM-184
> Project: Maven SCM
> Type: Bug
> Components: maven-scm-provider-perforce
> Versions: 1.0
> Reporter: John Didion
> Assignee: Mike Perham
> Fix For: 1.0
>
>
> createClientspec should look like this:
> {noformat}
> 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();
> }
> {noformat}
> 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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira