Maven SCM
  1. Maven SCM
  2. SCM-281

Perforce problem: incorrect client spec is used

    Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.0-beta-4
    • Fix Version/s: future
    • Labels:
      None
    • Complexity:
      Intermediate
    • Patch Submitted:
      Yes
    • Number of attachments :
      1

      Description

      I have 2 projects set up which use the same perforce scm url. One is run each 5 mins, the other is a nightly tests build. I've noticed that the latter never gets run-the message is that the dir is up-to date. It appeared that after the first project is run, its client spec is set to system variable in PerforceCheckOutCommand (maven-scm perforce provider) class and afterwards the value of the var is used instead of a correct client spec. I didn't remove the property set, as it is a fix to SCM-165, but rather the place where prop is used. Now works fine.
      Patch is attached.

      1. patch.p4.txt
        0.6 kB
        Anton Katernoga

        Activity

        Hide
        Mike Perham added a comment -

        Does Continuum have a way to set the environment variables for a build before the build is executed? If yes, you should be setting the clientspec system property to the proper value for each build beforehand. That patch is unacceptable because it removes the ability to specify the clientspec as a system property.

        Show
        Mike Perham added a comment - Does Continuum have a way to set the environment variables for a build before the build is executed? If yes, you should be setting the clientspec system property to the proper value for each build beforehand. That patch is unacceptable because it removes the ability to specify the clientspec as a system property.
        Hide
        Anton Katernoga added a comment -

        The purpose of SCM-165 isn't very clear to me, but from the comments I see it was necessary for several commands to run with same persistent client spec. Why do you save this specname in property although you can simply re-generate it from repo and workDir each time and it will be the same name?

        Show
        Anton Katernoga added a comment - The purpose of SCM-165 isn't very clear to me, but from the comments I see it was necessary for several commands to run with same persistent client spec. Why do you save this specname in property although you can simply re-generate it from repo and workDir each time and it will be the same name?
        Hide
        Mike Perham added a comment -

        Because some corporations have naming standards for clientspecs so the clientspec name cannot be pregenerated or determined beforehand.

        Show
        Mike Perham added a comment - Because some corporations have naming standards for clientspecs so the clientspec name cannot be pregenerated or determined beforehand.
        Hide
        Emmanuel Venisse added a comment -

        I removed the maven.scm.perforce.clientspec.name system property in continuum so the correct clientspec name used should be ok now.
        Anton, can you test it?

        Show
        Emmanuel Venisse added a comment - I removed the maven.scm.perforce.clientspec.name system property in continuum so the correct clientspec name used should be ok now. Anton, can you test it?
        Hide
        Emmanuel Venisse added a comment -

        Anton, do you have any news?

        Show
        Emmanuel Venisse added a comment - Anton, do you have any news?
        Hide
        Sebastian Annies added a comment -

        The client spec seems to be a major problem with the perforce integration. I propose to use the P4CONFIG mechanism (or a mechanism similar to it).

        1. the perforce commands should watch out for a file named .p4clientspec (just as an example) in the directory they are working in
        2. if the file exists, read it and use its content as client name.
        3. if a client is created by checkout command this file has to be written

        What do you think?

        Show
        Sebastian Annies added a comment - The client spec seems to be a major problem with the perforce integration. I propose to use the P4CONFIG mechanism (or a mechanism similar to it). 1. the perforce commands should watch out for a file named .p4clientspec (just as an example) in the directory they are working in 2. if the file exists, read it and use its content as client name. 3. if a client is created by checkout command this file has to be written What do you think?

          People

          • Assignee:
            Mike Perham
            Reporter:
            Anton Katernoga
          • Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated: