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

START_CMD="${P4D_DAEMON} -d -L $P4D_LOG -J $P4D_JOURNALS -r $P4D_ROOT -p $P4D_PO RT"

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

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

exit 0

Template of p4d.conf
=====================================
P4D_ROOT=/local/home/perforce/p4root
P4D_DAEMON=${P4D_ROOT}/p4d
P4D_LOG=${P4D_ROOT}/logs/p4d.log
P4D_JOURNALS=/backups/perforce_journal/journal
P4D_USER=perforce
P4D_PORT=1666

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

chkconfig –add /etc/init.d/p4d
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

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…
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :

Create a perforce Branch bases on Label

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

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

DONT FORGOT TO DO SUBMIT OPERATION
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :

Files opened for branch in default changelist

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

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?

Thanks

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
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :

Perforce Lable using changelist number or Date/time

scmuser created the topic: Perforce Lable using changelist number or Date/time
Hi,

I am trying to create a label using Perforce specific change list number or depends on Data and time for entire branch. Could you please help me with it?

scmuser replied the topic: Re: Perforce Lable using changelist number or Date/time
Ww need to understand some of the basic stuff which will help us to resolve this all the time….
To create a label, we will have perform 2 activities –
1. Create a Name of the Lable using following command…
p4 label

2. Sync this lable with client workspace source code.
p4 labelsync -l

this means labelsync will only add the client workspace soruce code to the specific label name. so its completly depends on us what source code we have in our client workspace if not head revsion, then we sync perforce source code via many following ways such as….
1. p4 sync file.c#4
2. p4 sync //depot/proj1/…@21
3. p4 sync @labelname
4. p4 sync @labelname,@labelname
5. p4 sync @2001/06/24
6. p4 sync //depot/proj1/…@2001/06/24

rajeshkumar replied the topic: Re: Perforce Lable using changelist number or Date/time
There are 2 kinds of labels.

1. Static Labels which explain above
2. Automatic Labels, Details and solution can be found below;

You can use automatic labels to specify files at certain revisions without having to issue the p4 labelsync command.

To create an automatic label, fill in the Revision: field of the p4 label form with a revision specifier. When you sync a workspace to an automatic label, the contents of the Revision: field are applied to every file in the View: field.

Example: Using an automatic label as an alias for a changelist number
Earl is running a nightly build process, and has successfully built a product as of changelist 1234. Rather than having to remember the specific changelist for every night’s build, he types p4 label nightly20061201 and uses the label’s Revision: field to automatically tag all files as of changelist 1234 with the nightly20061201 label:
Label: nightly20061201
Owner: earl
Description:
Nightly build process.
Options: unlocked
View:
//depot/…
Revision:
@1234

The advantage to this approach is that it is highly amenable to scripting, takes up very little space in the label table, and provides a way to easily refer to a nightly build without remembering which changelist number was associated with the night’s build process.

Example: Referring specifically to the set of files submitted in a single changelist.
Label: patch20061201
Owner: earl
Description:
Patch to 2006/12/01 nightly build.
Options: unlocked
View:
//depot/…
Revision:
@1238,1238

This automatic label refers only to those files submitted in changelist 1238.

Example: Referring to the first revision of every file over multiple changelists.

You can use revision specifiers other than changelist specifiers; in this example, Earl is referring to the first revision (#1) of every file in a branch. Depending on how the branch was populated, these files could have been created through multiple changelists over a long period of time:
Label: first2.2
Owner: earl
Description:
The first revision in the 2.2 branch
Options: unlocked
View:
//depot/release/jam/2.2/src/…
Revision:
“#1”

Because Perforce forms use the # character as a comment indicator, Earl has placed quotation marks around the # to ensure that it is parsed as a revision specifier.
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

rajeshkumar replied the topic: Re: Perforce Lable using changelist number or Date/time
To create a label using datetime requires the use of static labels. What you do is to do a “p4 sync” to a specific time, such as:

p4 sync @2011/03/18

Then tag the files with a label:

p4 tag -l //depot/…

For more information, please refer to the Perforce User Guide:

www.perforce.com/perforce/r10.2/manuals/…odemgmt.html#1066766
www.perforce.com/perforce/r10.2/manuals/…odemgmt.html#1081816
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

rajeshkumar replied the topic: Re: Perforce Lable using changelist number or Date/time
One more important things is that –
The automatic label (the “Revision:” field in the label
specification) was introduced in version 2006.2:

Major new functionality in 2006.2

‘Automatic’ labels – #107125 (Bug #20887) **

The new automatic label feature introduced in 2005.2 but
undocumented is now fully supported. By adding a “Revision”
field to the label specification you can now make that label
appear as if ‘p4 labelsync’ had been done on the label using
that revision. The only difference is that if the “Revision”
specification is dynamic (e.g #head) the apparent contents of
the automatic label will change, while a static label set with
‘p4 labelsync’ will not. Note that when executing the command
‘p4 labels ‘ automatic labels will not be displayed.

( www.perforce.com/perforce/r10.2/user/relnotes.txt )
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :

Need correct P4win and p4v installer

scmuser created the topic: Need correct P4win and p4v installer
My Server version is 2004.2 and I would like to have supported p4win and p4v which will support to my perforce server in 64 bit.

Could you please let me know from where I can download right installer?

rajeshkumar replied the topic: Re: Need correct P4win and p4v installer
the current version of the P4V client is only compatible with Perforce servers 2005.2 and later. The last version of P4V that worked with P4D 2004.2 was P4V 2008.2 which can be downloaded from our ftp site.

The 64bit version can be downloaded from:

ftp://ftp.perforce.com/perforce/r08.2/bin.ntx64/

and the 32bit version can be downloaded from:

ftp://ftp.perforce.com/perforce/r08.2/bin.ntx86/
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :

Use of p4 spec command

scmuser created the topic: Use of p4 spec command
Use of p4 spec -o label command

“p4 spec” is an unsupported command and thus not documented in the command reference. The only reference we have is “p4 help spec”:

spec — Edit spec definitions (unsupported)

p4 spec [-d -i -o] type

Edit any type of specification: branch, change, client, depot,
group, job, label, spec, stream, trigger, typemap, or user. Only
the comments and the formatting hints can be changed. Any fields
that you add during editing are discarded when the spec is saved.

‘p4 jobspec’ is equivalent to ‘p4 spec job’, and any custom spec
(include the job spec) can be deleted with ‘p4 spec -d type’.

Please let me know if you have any further questions.

Tagged :

Need Webbased tool to Admin 100’s of Perforce Server Instance

scmuser created the topic: Need Webbased tool to Admin 100’s of Perforce Server Instance
Can I imagine a web based tool which can administer 100’s of perforce server instance and where employee can browse all listed depot and if they need access(read/Write/Super) on any depot/branch/codeline, they can raise a request through given interface in web tool and this request directly goes to admin(Super) of that particular Server Instance in form of an email, and he can reject/approve this access. As soon as he accept the request, new access definition should be added in perforce protection table?

Any solution?

Tagged :

Need innovative Idea in Perforce Server Administration

scmuser created the topic: Need innovative Idea in Perforce Server Administration
Hi,

I have one scenario and I am looking for solution in Configuration Tools such as Perforce. Can you please let me know is there any common solution available in Perforce or i will have to developed a new application.

Scenario: I have 50 Perforce Server Instance running and i would like to minimize the time spending on admin work such a user creation and deletion.

Is there any ways where i can centralize all perforce server following activities…

1. User Creation /Deletion

2. Group Creation/ Deletion

3. Assigning Depot Access to group such as modifying protect table

rajeshkumar replied the topic: Re: Need innovative Idea in Perforce Server Administration
Answer found from Perforce Support – The feature (centralised server) you are looking for has been available undocumented for several years. However since the 2010.2 release, it is now fully supported and documented:

Most organizations use only one Perforce Server for the entire organization, but over time, as organizations grow and merge, or as different groups within an organization need to share data, an organization can find itself with multiple Perforce Servers across a common user base.

If you are running multiple Perforce servers, you can configure them to retrieve protections and licensing data from a centralized authorization server. By using a centralized server, you are freed from the necessity of ensuring that all your servers contain the same users and protections entries.
If a user does not exist on the central authorization server, that user does not appear to exist on the outer server. If a user exists on both the central authorization server and the outer server, the most permissive protections of the two lines of the protections table are assigned to the user.

You can use any existing Perforce Server in your organization as your central authorization server. The license file for the central authorization server must be valid, as it governs the number of licensed users that are permitted to exist on outer servers. To configure a Perforce Server to use a central authorization server, set P4AUTH before starting the server, or specify it on the command line when you start the server.

If your server is making use of a centralized authorization server, the following line will appear in the output of p4 info:

Authorization Server: host:port

Where host:port refer to the host and port number of the central authorization server.

In the following example, an outer server (named server2) is configured to use a central authorization server (named central). The outer server listens for user requests on port 1999 and relies on the central server’s data for user, group, protection, review, and licensing information. It also joins the protection table from the server at central:1666 to its own protections table.

For example:
p4d -In server2 -a central:1666 -p 1999

When you configure a central authorization server, outer servers forward the following commands to the central server for processing:

group, groups, passwd, review, reviews, user, users, protect, protects, login, logou
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :

Open for write: Permission denied in perforce

scmuser created the topic: open for write: Permission denied in perforce
While login to perforce server, i got following issues…Any help?
-bash-3.00$ ./p4 -p perforceserver:1600 -u scm login
Enter password:
Fatal client error; disconnecting!
open for write: /user/scm/tmp.10149.21: Permission denied

Tagged :