Error while deleting perforce users

scmuser created the topic: Error while deleting perforce users

I am deleting perforce user using following command…
p4 user -d -f Ani

but i got some error message such as …
User Anil has file(s) open on 3 client(s) and can’t be deleted.

any help on this

mnanjala replied the topic: Re: Error while deleting perforce users
Try deleting particular user client first later you should able to delete user.


Tagged :

Opened files issues in perforce

rajeshkumar created the topic: Opened files issues in perforce
I am having one issues in perforce…Any help

User name “ram” has created client name “client1” in one hostmachine. Next day username “ramesh” has used same client name in same host machine and opened few files using his own ids.

The problem with Perforce Admin is: Admin should delete all the opened files open by ramesh in same client and hostname.

Admin should not delete any user account and re-create it
Admin can not delete client as files are opened n deletion would not be allowed
Ramesh is not available / not his machine / not his client / for reverting their own files

Last options, reverting opened file from admin.

I tried to revert back by admin user by using following command but it says its opened by ramesh
> p4 revert -c 164680 *

Any other solution where admin can revert these opened files
Rajesh Kumar
Twitt me @

Ways to Pass Password in Triggers file in Perforce

rajeshkumar created the topic: Ways to Pass Password in Triggers file in Perforce
Option 1
If your Perforce server is set to security level 2 or lower you can have your trigger script run as the same user every time (typically a “background” user). Then, either have the server’s P4PASSWD environment variable set to the background user’s password,

Option 2
You can also use the -P flag to specify the password with the P4 commands issued by the script.

Option 3
You can echo the password and pipe it to the login command. Note that there is no space between the password and the pipe symbol.
echo | p4 login

Option 4
If you do not want to place a password in the script, you can use a text file containing the password. Make sure this password file has appropriate read and write privileges.
p4 login < password.txt Option 5 A more secure method is to use ticket based authentication and a group to keep a background user "logged in" at the Perforce server: 1. Create a group: p4 group always_on 2. Add your background user to the "Users" field. 3. Change the timeout from the default setting (12 hours), which is set in seconds. The new value depends on the server version: # 2008.1 and later: Set this value to "unlimited". A timeout value of zero is no longer accepted. # 2005.1 to 2007.3: Set this value to zero. # 2004.2 and earlier: Set this to a very large value -- but not too large, as some server versions do not handle situations where the timeout is set to exceed the "Unix Epoch", which is approximately in the year 2038. A safe value is 315532800 seconds, which is about 10 years. # Save the group. # In your trigger script, log the background user in and run the trigger once. echo password| p4 -p server:port -u username login # If the trigger runs properly, you can remove the password line. The user now remains logged in. Since this is ticket based authentication, they remain logged in even if the server is shut down or the hardware is rebooted. Regards, Rajesh Kumar Twitt me @

Tagged :

rsync in perforce

scmuser created the topic: rsync in perforce
I have to replicate my perforce server to remot location.. I am trying somthing different this time of not using p4 prox but rsync

i can setup a rsync to sync all filesystem from one perforce server instance to another perforce server but how to replicate metadata which will be autosync with each other n enable the p4 operation at both end and sync each other?

rajeshkumar replied the topic: Re: rsync in perforce
There is no way to keep two seperate Perforce systems in sync with each other by merging changes in both directions automatically.

Perforce 2010.2 does includes replication for creating read-only or warm standby servers:…/10_replication.html

However this is one way replication from main Perforce server to replica. If users at the replica site wanted to make changes they would still need to connect to the main Perforce server.

Perforce also provide remote depots. They do have some limitations and a performance overhead so it is recomended that they are mainly used to import code from one Perforce server to another and not as a gateway through which most developers work. This is discussed in:
Rajesh Kumar
Twitt me @

Tagged :

Alternate to p4 proxy

scmuser created the topic: Alternate to p4 proxy

I know p4 proxy which enables the p4 server working in distributed environment…do you know any alternate to p4 proxy which can replicate the p4 server to remote location with all p4 operationb supported as its in p4 proxy?

rajeshkumar replied the topic: Re: Alternate to p4 proxy

if you are looking for any of the answer of the following questions, perforce answer is NO…

1/ Is there any alternate ways to setup P4 Proxy Server? NOT using p4p/p4ps


2/ Is There ways to setup perforce server distributed in 2 different location where each time submit operation happens with nearest located server and BOTH server sync the DB and versioning files with each other?

Rajesh Kumar
Twitt me @

Tagged :

Showing Perforce changelists submitted since last

scmuser created the topic: Showing Perforce changelists submitted since last
Before I sync my Perforce client in the morning, I’d like to read the diffs and log messages for any changelists that will affect me. Unfortunately, though, I can’t find a simple way to list such changelists using either p4 changes or P4V. I suspect I’m missing something simple, though.

Is there a way that I can list all the changelists submitted since I last sync’ed my client? If I can get the full descriptions and diffs from previous depot revisions, as p4 describe does for a single changelist, that would be even better.

rajeshkumar replied the topic: Re: Showing Perforce changelists submitted since last
Please find answer below;…tted-since-last-sync
Rajesh Kumar
Twitt me @

Tagged :

Run perforce Server as a Service

rajeshkumar created the topic: Run perforce Server as a Service
Run perforce Server as a Service OR boot automatically when system restart

Template of p4d file under /etc/init.d

#! /bin/sh
# chkconfig: 35 95 05
# description: Perforce revision control system server.

umask 022

# Source function library.
. /etc/rc.d/init.d/functions

. /etc/p4d.conf


# See how we were called.
case "$1" in
echo -n "Starting p4d "
if [ ! -z "$P4D_USER" ]; then
su - $P4D_USER -c "$START_CMD"
touch /var/lock/subsys/p4d
echo -n "Stopping p4d: "
killproc p4d

rm -f /var/lock/subsys/p4d
status p4d
$0 stop
$0 start
echo "Usage: p4d {start|stop|status|restart}"
exit 1

exit 0

Template of p4d.conf

Add /etc/init.d/p4d into chkconfig using following command…

chkconfig –add /etc/init.d/p4d
Rajesh Kumar
Twitt me @

chander replied the topic: Re: Run perforce Server as a Service
I think Services is a windows concept and method.

To run perforce as a service the Perforce Server should be installed as a Windows service. Then an Administrator privileges can start and stop it using the Services dialog in the Control Panel.

To start the Perforce service:
Context-click on “My Computer”, and select “Manage”. The “Computer Management” window is displayed.
In the right hand pane, double click on “Services and Applications”.
Double click on “Services”. You now have a list of available Windows services.
Scroll down until you see the “Perforce” service. Right click on this item and select “Start”.

In Unix it is running as a Daemon

rajeshkumar replied the topic: Re: Run perforce Server as a Service
Hi chander,

Thanks for correcting terminology and your inputs for windows…
Rajesh Kumar
Twitt me @

Tagged :

Create a perforce Branch bases on Label

scmuser created the topic: Create a perforce Branch bases on Label

Can you tell me how to create a Perforce Branch based on perforce label?

rajeshkumar replied the topic: Re: Create a perforce Branch bases on Label
I found very good explanation on google…

* Create a branch specification in Perforce. Go to View, Branches, right click and choose New Branch.
* Enter a name for the branch specification. If the release 2a needs to be branched from label r0.7.20 then a suitable name would be Rel2a_r0.7.20.
* Enter the view for the branch, for example //depot/Rel2a/… //depot/r0.7.20/… and click OK. The first part of the view is the source of the branch and the second part is the target location.
* Now create the files in the branch by using the Perforce integrate command. Right click on the branch specification and choose Integrate using branch Rel2a_r0.7.20.
* Check Limit integration to and enter //depot/Rel2a/…@r0.7.20
* Click on Integrate

Alternatively one can populate the branch (perforce integrating) by entering from the command line:

p4 integrate -b -s //depot/Rel2a/…@

If you use the -n flag after integrate then this command just lists the changes without performing any actions.

Finally check in the files. You might need to resolve your files first: use “p4 resolve” or right click on the change list in the perforce GUI. You may want to give the following description for the submit:

Created new branch r0.7.20 from //depot/Rel2a/…@r0.7.20

What if you get the following error message upon integrating the files:

//depot/Rel2a/…@r0.7.20 – no permission for operation on file(s).

This error can have several causes: check permissions (p4 protect) and make sure that (the future location of) the target files are in your workspace definition.

One more Way….

here’s how you can create a branchspec from a label using the p4 Win client:

* Create a new branchspec
* From the BranchSpec menu -> View BranchSpecs, right click on your new branchspec, and choose “Integrate Using [branchspec name]“
* In the integration dialog that appears, click the Options button. On the Options tab, check “Permits deletes re-adds”. On the Source Revision Range tab, under “Starting with” check “Other”, select “Label” and enter the source label’s name, then under “Ending with” check “Other”, select “Label” and again enter the source label’s name
* Click OK to close the integration dialog
* Click OK on the main integration dialog to perform the integration

Rajesh Kumar
Twitt me @

Tagged :

Files opened for branch in default changelist

DS123 created the topic: Files opened for branch in default changelist

I’m integrating code between 2 codelines using p4 integrate.

Following p4 integrate/resolve -n /resolve -as/submit steps

the target line looks as expected.

However, I have a bunch of files remaining in the default changelist.

‘p4 opened’ lists theses files as ‘……branch default change…’ open files.

Also when I look in the depot I see cooresponding entries there as
‘ The file is open for branch in the default changelist ‘ with the file branch logo.

Is there a way of ‘clearing’ the default changelist?

Its as if the integration is nearly complete, but the changes are getting reopened in the default changelist. And the depot is reflecting this.

The only way I know to remove an opened file is to revert it, but will a revert on these file, undo the integrate?


rajeshkumar replied the topic: Re: Files opened for branch in default changelist
If the integration has been submitted, then ‘p4 revert’ will only revert the pending changes in your workspace. To get a better understanding of the situation please run the following commands from the workspace experiencing this behaviour and send me the full output:
p4 -Ztag info
p4 opened
p4 client -o
Rajesh Kumar
Twitt me @

Tagged :