I have a cpp file path and Function Name written in that file for which I am trying to fetch the Changelist when that function was written. Using the command as below:
p4 annotate -I filename.cpp | findstr "function Name"
when executing above command in cmd getting the following error:
Remote depot 'server' database access failed.
Remote server refused request. Please verify that service user is correctly logged in to remote server, then retry.
connect: Connection timed out
what is going wrong here? This is happening for some files only , for other files command is executing suucessfully and returning the changelist.
The file in question has merge ancestors that are in a remote depot, and the remote depot is currently unavailable, so displaying the full merge history (with annotate -I) is failing. Check with your Perforce admin to either restore access to the remote depot or (if it's permanently dead) obliterate it so your local server doesn't keep trying to query it.
Related
I need to import the perforce depot workspace into linux development Environment.
I am getting error as p4passwd unset on p4 sync and login. Can anyone please explain this?
Run:
p4 set P4USER=your_user_name
p4 set P4CLIENT=your_client_name
where your_user_name is your actual Perforce username and your_client_name is the unique name you want to use to describe your workspace on this Linux machine. (If your Perforce username is the same as your Linux login, and you're fine with using your local hostname as the client name, you can skip this.)
Then run:
p4 login
and enter your Perforce password (not your Linux password).
Then run:
p4 client
Make any edits you like to the client spec. If you don't know what to do, just save it and exit the editor. The default will do to get you started.
Then run:
p4 sync
This will sync files from the depot to your workspace, according to your client spec. (If you just used the default client definition, everything in the depot is being synced to your current directory.)
https://www.perforce.com/perforce/doc.051/manuals/p4guide/03_quickstart.html
I have recently started using perforce on Windows 7. I have the perforce synced on my local machine using P4V. I was trying to run some other tool that uses the path where my perforce local directory is mapped on my machine. It appears that it is picking up the wrong one. While trying to debug, I noticed that the 'p4 info' command returns the 'Client root' which is set to the wrong value. The 'p4 set' shows the P4ROOT which is the correct value. What exactly is the difference between 'p4 set' and 'p4 info'? Can I update the 'Client root'?
P4ROOT is a server-side setting and is (confusingly) not related to your client root. The client root is set in the client spec that is specified via P4CLIENT and edited via the "p4 client" command.
To find the right value for P4CLIENT, look for the "Workspace" name in P4V ("workspace" is a synonym for "client"). Then tell the command line to use the same value like this:
p4 set P4CLIENT=(client name)
Once you do this, you should already have the right client root, but if you needed to update the client root, you'd do it by running:
p4 client
EDIT: RESOLVED! solution: all I did was to restart PC (not sure if this helped too), but then i logged id via console again, typed p4 client, it opened the cfg file, i closed it and then I also had to type: p4 set P4CONFIG="C:\workspace_directory\p4config.txt", now it's working.
original issue:
I'm trying to set up my first assembla project with perforce. "p4 info" is Ok, but I cannot run client without the error message. I already set up my connection settings into config file, if I type "p4info". Results:
Client name: my_name
Client host: my_host
Client unknown.
...the others seem to be fine
--name and host are fine, but I seem to need set up my client root workspace directory, but I was unable to find the way how to do it.
For me the reason was blank P4PORT. I added P4PORT manually and the error goes away.
export P4PORT="p4-host:port"
It is surprising that the P4PORT in p4v and p4 are not in sync. I had added p4port info in p4v and it works fine but for p4 i had to add manually.
I am getting a "client unknown" error when trying to commit any files from webstorm to perforce. My p4v is configured correctly and works outside of Webstorm and my p4 command line is also correctly configured yet when I use the exact same setup in webstorm I get the client unknown error. My client is setup and correctly copied into perforce. Any idea what might be going on here? Are there logs that will show me a more complete error?
For those who are facing this issue :
Check the "p4 info" output and see if "User name", "Client name" and Client are having correct data.
If they are 'none' / 'unknown', then check or set below environment variables
P4CLIENT
P4USER
P4PORT
P4CLIENT : Should match with your "workspace" name
P4USER : Username to login to perforce
P4PORT : Should have proper URL "HOSTNAME:PORT" of perforce server : Ex: 192.128.10.130:6666
I figured this out finally, though I ran into a new issue.
Resolution: The perforce client P4 (not P4v) has to be installed, and it was but it was not in the correct directory. P4 needs to be installed in your Applications on a Mac and that file needs to be made editable. You will also likely need to change your permissions for that file to allow system read/write access.
To make the file executable once it is in the Applications directory from the command prompt navigate to your applications directory and type: chmod +x p4 (http://www.perforce.com/perforce/doc.current/manuals/p4guide/01_install.html)
Then you can find the file in finder and right click it, the click get info from the context menu. From there at the very bottom will be file permissions. I set them all to read/write. You could also do this from the command line by typing chmod 755 p4 I think but I am not great on the command line so use at your own risk.
As far as your workspace is concerned that should be whatever your workspace is set to in P4V.
At that point if you hit test connection inside Webstorm->preferences->perforce it should work or at least give you a new error with some more information.
Mine was able to connect successfully but now when I try to update a file I get an error saying "path '/users/my-path.....' is not under the client's root '/users/my-path' even though the first path specified is clearly a child of the second path. Still working on this error.
Mine was able to connect successfully but now when I try to update a file I get an error saying "path '/users/my-path.....' is not under the client's root '/users/my-path' even though the first path specified is clearly a child of the second path. Still working on this error.
In my case i resolve this problem -> i had physical way to my files /Users/.... but in perforce i had a root like /users/.... (in lowercase), i change root and its help for me in mac
Surprizing little documentation on setting this up, so I'm sure this is a setup problem.
Steps to reproduce:
Open terminal (p4.exe in PATH)
type p4 [RET]
Hangs indefinitely. When I issue commands from emacs (ie p4 edit [file] it eventually comes back with
Perforce client error:
Connect to server failed; check $P4PORT.
TCP connect to perforce failed.
perforce: host unknown.
The error message that is displayed when called from emacs points in the right direction, p4 can't find your perforce server (the default is perforce, that's where the perforce: host unknown comes from.
Make sure to either specify -p for your call to p4 or set the environment variable P4PORT. Beware, despite the name, P4PORT includes the hostname of the perforce server.
p4 -p serverhost:1666
I'm not sure why p4 would hang indefinitely on the CLI and return after some time when called from emacs.
In my case I set these variables in order to get it to work (very annoying it just hangs instead of complaining of the missing configuration).
P4PORT
P4USER
P4CONFIG
P4EDITOR
Please check if a p4 process running in background in the same shell. you need to stop already running process.