Perforce problem and question (#1438)

Hi,

I tried to setup a project using perforce, but I only get back this error:

Perforce 'chanegs' returns empty string
jetbrains.buildServer.vcs.VcsException: Perforce 'chanegs' returns empty
string
at
jetbrains.buildServer.buildTriggers.vcs.perforce.PerforceConnection.getCurrentVersion(PerforceConnection.java:231)
at
jetbrains.buildServer.buildTriggers.vcs.perforce.PerforceSupport.getCurrentVersion(PerforceSupport.java:123)
at
jetbrains.buildServer.buildTriggers.vcs.VcsChangesLoader.loadChanges(VcsChangesLoader.java:37)
at
jetbrains.buildServer.serverSide.impl.ProjectImpl.loadChanges(ProjectImpl.java:277)
at
jetbrains.buildServer.serverSide.impl.ProjectImpl.checkForModifications(ProjectImpl.java:287)
at
jetbrains.buildServer.serverSide.impl.BuildServerImpl.checkForModifications(BuildServerImpl.java:1278)


I'd guess that this is a spelling mistake and you wanted to use
"changes" instead of "chanegs".

Let's assume, it would work. I'm a bit irritated that I can specify the
port, but not the host name for the perforce server. It seems to work
because Test connection opens a warning dialog (why warning?) much too
big for my screen, displaying the client specification. Perhaps, because
I've mapped the server to localhost to by able to work remotely?

Stefan

7 comments
Comment actions Permalink

Update: I replaced the p4.exe to learn how you call that application.
You use "changes", so the error must be in the error message.

You call

p4.exe -u user -c client -p port changes -m 1 If I enter that command, p4.exe doesn't return anything for me and this probably causes the problem. Unfortunately, I don't know much about perforce so I can't really tell whether this is a general problem or just an issue with our own configuration. If I omit the depot argument, it works as I think it is expected: I see the latest change to the project... actually, to the whole depot, I guess. My client-view-spec for my example project contains 50+ lines because we map everything third party via perforce into the client view. So I'm not sure what I should use as the required depot line. Our depot is structed as /////... and //share/thirdparty///]]>/...

and a client view spec puts together all partials (a "partial" is
typically an IDEA module but could also be just a part of a module) and
third party libs.

Is the TeamCityServer supposed to take the client view spec and check
out everything and put it into the folders specfied in that mapping?
Otherwise, it seems to be impossible to reconstruct projects in our case.

Do you have an easy solution? If you think, we misuse perforce, please
tell me because personally, I think, that's way to complate...

Stefan

0
Comment actions Permalink

Sorry, for replying to myself and therefore talking to myself :)

I think, now I understand how it is supposed to work: I need to add a
VCS root for each line in the perforce client spec, right?

Not good :(

At least the path to the P4 executable should be shared...

And I'd really love if I could simply import by client view spec somehow...

Stefan

0
Comment actions Permalink

Stefan Matthias Aust writes: >Hi, > >I tried to setup a project using perforce, but I only get back this error: > >Let's assume, it would work. I'm a bit irritated that I can specify the >]]>port, but not the host name for the perforce server.

I put host:port in the port field and it works fine. Did you give
that a try?

--
-- Steve

0
Comment actions Permalink

Stefan Matthias Aust <nobody@3plus4.de> writes:

>Sorry, for replying to myself and therefore talking to myself :)
>
>I think, now I understand how it is supposed to work: I need to add a
>VCS root for each line in the perforce client spec, right?
>
>Not good :(
>
>At least the path to the P4 executable should be shared...
>
>And I'd really love if I could simply import by client view spec somehow...
>
>Stefan

We use perforce at our company. In an earlier eap I ran into the
problem where my client spec was not being used - only the depot
line. That was supposedly fixed in this latest eap; I haven't had a
chance to test it yet.

As for your original problem, I think I ran into that when I first
tried setting up ts. Make sure that the depot line you give ts has
'...' at the end, e.g:

//depot/project/branch/...

That fixed it for me.

Having said that, I don't see the purpose of the depot line. If
teamserver has a port, user and client spec, it has all it needs; that
extra depot line seems irrelevant.

--
-- Steve

0
Comment actions Permalink

What about port.
When perforce says 'port' it means hostname:portnum

Thms like perf-unit:1666. Try it!

When you're configure some depot path (//Project/SubProject/...) server will
download all files under it corresponding to your client spec (of course you
have not to specify new root for each one).

"Stefan Matthias Aust" <nobody@3plus4.de> wrote in message
news:e92e20$7ht$1@is.intellij.net...

Sorry, for replying to myself and therefore talking to myself :)

>

I think, now I understand how it is supposed to work: I need to add a
VCS root for each line in the perforce client spec, right?

>

Not good :(

>

At least the path to the P4 executable should be shared...

>

And I'd really love if I could simply import by client view spec
somehow...

>

Stefan



0
Comment actions Permalink

Steve Allan schrieb:

We use perforce at our company. In an earlier eap I ran into the
problem where my client spec was not being used - only the depot
line. That was supposedly fixed in this latest eap; I haven't had a
chance to test it yet.

As for your original problem, I think I ran into that when I first
tried setting up ts. Make sure that the depot line you give ts has
'...' at the end, e.g:

//depot/project/branch/...

That fixed it for me.


Yes, I forgot the "/..." too, which causes the error I showed here.
Because I think, it's a common error, it might be useful to add a help
line to the dialog, warning the user not to forget the ...

I also detected an invalid depot line in my mapping.

Both issues could have caused by problems. I haven't tested so far
whether the client view template is picked up or not because I now use
multiple entries - one per depot path (as mentioned in the other thread).

Stefan

0
Comment actions Permalink

Olesya Smirnova schrieb:

What about port.
When perforce says 'port' it means hostname:portnum

Thms like perf-unit:1666. Try it!


Thanks. You're of course right. I should have looked into the IDEA
perforce mapping where I use the field exactly that way. Stupid me :)

Stefan

0

Please sign in to leave a comment.