Problems getting source code out of perforce into a new project

Hi,

This is most likely something simple, but I haven't been able to figure it out. I just downloaded 5.0 and I am trying to setup a new project. I have perforce setup as the default VCS and the connections work fine. I can't seem to figure out how to checkout the source code into my project. Is there a way to do this from IDEA? I have tried checking out the code using the P4Win tool into my project. When I try to do anything to a file (like edit), it says "File not on server". All the files are brown in color (which from previous experience is a file not checked into the VCS). Could someone please tell me what simple thing I am missing?

13 comments
Comment actions Permalink

Make sure your src paths in IDEA are in the Perforce client_spec you setup
in IDEA.

"Charles Canning" <no_mail@jetbrains.com> wrote in message
news:622257.1123059341814.JavaMail.itn@is.intellij.net...

Hi,

>

This is most likely something simple, but I haven't been able to figure it
out. I just downloaded 5.0 and I am trying to setup a new project. I have
perforce setup as the default VCS and the connections work fine. I can't
seem to figure out how to checkout the source code into my project. Is
there a way to do this from IDEA? I have tried checking out the code using
the P4Win tool into my project. When I try to do anything to a file (like
edit), it says "File not on server". All the files are brown in color
(which from previous experience is a file not checked into the VCS). Could
someone please tell me what simple thing I am missing?



0
Comment actions Permalink

I created the project around the code that I checked out, so I know the sources matches my perforce class. After playing with the P4 command line, it appears that IDEA is using the default P4 client spec and not the spec I specified. My code doesn't match the default client spec. I am not a skilled user of P4, so it would be great if someone else could validate this.

0
Comment actions Permalink

You need to specify the client spec you want IDEA to use in the Perforce
config.

"Charles Canning" <no_mail@jetbrains.com> wrote in message
news:9371988.1123090868772.JavaMail.itn@is.intellij.net...
>I created the project around the code that I checked out, so I know the
>sources matches my perforce class. After playing with the P4 command line,
>it appears that IDEA is using the default P4 client spec and not the spec I
>specified. My code doesn't match the default client spec. I am not a
>skilled user of P4, so it would be great if someone else could validate
>this.


0
Comment actions Permalink

I know have the p4 working from the command line with the default client spec, but IntelliJ still says "file not on server". I have logging turned on and this is what I get

fstat C:/work/projects/DS/Shared/Shared/src/java/xx/internal/ds/shared/utilities/ThreadPool.javaErrCode=0
StdOut:----



StdErr:----



End----



if I run p4 fstat C:/work/projects/DS/Shared/Shared/src/java/xx/internal/ds/shared/utilities/ThreadPool.java, I get the proper response.

Is there a way to see the exact command being executed by IDEA? Also, is there a way to determine which p4 is being executed. It elipsis (...) next to the select p4 executable doesn't do anything.

0
Comment actions Permalink

I have specified the client spec and I made the default client spec match the client spec I was originally using.

0
Comment actions Permalink

Try to reopen your project with enabled logging. p4.output has to contain
info command result. There should be used client and user names

"Charles Canning" <no_mail@jetbrains.com> wrote in message
news:5643469.1123093907846.JavaMail.itn@is.intellij.net...
>I know have the p4 working from the command line with the default client
>spec, but IntelliJ still says "file not on server". I have logging turned
>on and this is what I get
>

fstat
C:/work/projects/DS/Shared/Shared/src/java/xx/internal/ds/shared/utilities/ThreadPool.javaErrCode=0
StdOut:------------

>

StdErr:------------

>

End----------------

>

if I run p4 fstat
C:/work/projects/DS/Shared/Shared/src/java/xx/internal/ds/shared/utilities/ThreadPool.java,
I get the proper response.

>

Is there a way to see the exact command being executed by IDEA? Also, is
there a way to determine which p4 is being executed. It elipsis (...) next
to the select p4 executable doesn't do anything.



0
Comment actions Permalink

He's right about the ellipses to select p4 executable not working. Should I
file a bug?

"Olesya Smirnova" <Olesya.Smirnova@jetbrains.com> wrote in message
news:dcr40j$c05$1@is.intellij.net...

Try to reopen your project with enabled logging. p4.output has to contain
info command result. There should be used client and user names

>

"Charles Canning" <no_mail@jetbrains.com> wrote in message
news:5643469.1123093907846.JavaMail.itn@is.intellij.net...

>>I know have the p4 working from the command line with the default client
>>spec, but IntelliJ still says "file not on server". I have logging turned
>>on and this is what I get
>>
>> fstat
>> C:/work/projects/DS/Shared/Shared/src/java/xx/internal/ds/shared/utilities/ThreadPool.javaErrCode=0
>> StdOut:----


>>
>> StdErr:----


>>
>> End----


>>
>> if I run p4 fstat
>> C:/work/projects/DS/Shared/Shared/src/java/xx/internal/ds/shared/utilities/ThreadPool.java,
>> I get the proper response.
>>
>> Is there a way to see the exact command being executed by IDEA? Also, is
>> there a way to determine which p4 is being executed. It elipsis (...)
>> next to the select p4 executable doesn't do anything.
>



0
Comment actions Permalink

If I run the command

p4 -c ccanning_idea -p perforce:9591 -P **** edit C:\work\projects\DS\Shared\Shared\src\java\xx\internal\ds\shared\utilities\DateUtilities.java

it works from any directory

if I select the file

C:\work\projects\DS\Shared\Shared\src\java\xx\internal\ds\shared\utilities\DateUtilities.java in IDEA and run edit, I get the "File not on server" error.

I have IDEA settings as

PORT: perforce:9591
CLIENT: ccanning_idea
USER: ccanning
PASSWORD: ****
CHARSET: None

Does anyone have any pointers or any suggestions for me to try?

0
Comment actions Permalink

This is what I get

User name: ccanning
Client name: ccanning_idea
Client host: us-sea-965323
Client root: C:\work\projects\DS\Shared
Current directory: c:\Program Files\JetBrains\IntelliJ IDEA 5.0\bin
Client address: 192.168.151.233:51868

0
Comment actions Permalink

I think your module root needs to be C:\work\projects\DS\Shared\Shared

"Charles Canning" <no_mail@jetbrains.com> wrote in message
news:7971275.1123096283606.JavaMail.itn@is.intellij.net...

This is what I get

>

User name: ccanning
Client name: ccanning_idea
Client host: us-sea-965323
Client root: C:\work\projects\DS\Shared
Current directory: c:\Program Files\JetBrains\IntelliJ IDEA 5.0\bin
Client address: 192.168.151.233:51868



0
Comment actions Permalink

My module root is C:\work\projects\DropShip\Shared\Shared and my src folder is /src/java.

The Perforce client root is C:\work\projects\DropShip\Shared because it is the base for multiple modules.

0
Comment actions Permalink

I just noticed something. It is working for me with build 3429 on linux. I will try the latest release on linux and see if it still works. Currently, I am running on XP.

0
Comment actions Permalink

This also works for me using 5.0 on linux with build 5436.

0

Please sign in to leave a comment.