|
|
|
[
Permlink
| « Hide
]
Mike Perham - 27/Mar/07 04:45 PM
E, I'm on vacation for the next week.
Patrick, do you have any time to work on this?
E, can you give more details about how you expect this to work? Am I supposed to map { directory -> clientspec-name }? The SCM provider really only knows the current directory it is working with. So how will Continuum pass me the clientspec name to use?
Continuum know only the scm url.and the working directory.
The actual DEFAULT_CLIENTSPEC_PROPERTY system property can't be used because in a CI tool like continuum, we manage more that one project so more than one clientspec, and this system property allow only one. I thought to a map that will contain all client specs with the scm url in the key and the client spec in the value. I am pretty busy, but I can take a look.
But where does this map come from? Who creates it? No, the clientspec is completely independent from the checkout and in most cases is not created by the provider.
I might be able to get the existing clientspec name using 'p4 where pom.xml' and examining the output but this doesn't help in the case where I want to checkout a new project using an existing clientspec. Let me think about this more.
I don't see any way to support multiple clientspecs without explicit support in Continuum and SCM. We need support for ad hoc variables associated with a build which can be passed to the provider. The system property is a hack which obviously doesn't scale.
Possible solution without modification in continuum:
instead of system property, we can store the clientspec in ${user.home}/.scm/perforce.xml (other providers use a xml file to configure the provider too) <settings>
<clientSpecMappings>
<clientSpecMapping>
<scmUrl>scm:perforce:username@host:port:path_to_repository1</scmUrl>
<clientSpecName>username-host-MavenSCM-path-to-repo1</clientSpecName>
</clientSpecMapping>
<clientSpecMapping>
<scmUrl>scm:perforce:username@host:port:path_to_repository2</scmUrl>
<clientSpecName>username-host-MavenSCM-path-to-repo2</clientSpecName>
</clientSpecMapping>
</clientSpecMappings>
</settings>
and in PerforceScmProvider.getClientspecName(...) we return the clientSpecName from the xml file. If if doesn't exist, we generate a default name and we store it in the xml file. WDYT? Currently, each client spec has
Maybe, it can be changed to a unique client spec
So things seems to be manageable without continnum concept in the scm... |
||||||||||||||||||||||||||||||||||||||||||||