Perforce Public Knowledge Base - Storing Property Settings in Perforce
Downloads Blog Company Integrations Careers Contact Try Free
Menu Search
Reset Search



Storing Property Settings in Perforce

« Go Back



With Perforce Server 2013.1, the p4 property command was introduced to allow for storage of property settings in the Perforce database. The Perforce Server does not directly use property values. It provides storage of property values for use by applications that wish to persistently store their configuration settings and other property data in the server.

Note: P4V versions 2013.1 and later can use global properties to set key user preferences that can impact server performance or security. See P4V Global Settings, Part 1 and P4V Global Settings, Part 2 for more information. 


There are three forms of the p4 property command:

Add/Update a property

p4 property -a -n name -v value

Delete a property

p4 property -d -n name

List a property

p4 property -l -n name

See p4 help property or the "p4 property" entry in the Command Reference for further details on general usage. 

Security Considerations

  • Anyone can view public properties (those not tagged with a user/group).
  • Anyone can view properties associated with their own user and any groups they belong to.
  • The Perforce user must have admin privileges or greater to add, update, or delete properties, or to view properties for a different user/group. See the Example Usage below for syntax for listing all properties. 

Example Usage

A Perforce administrator wants to limit server refreshes for P4V for the group "busy_group" to once every 25 minutes. The command they could enter:

p4 property -a -n P4V.Performance.ServerRefresh -v 25 -g busy_group

User "busy_admin" has a legitimate reason to have their client more often, so the administrator can provide them a 10 minute refresh:

p4 property -a -n P4V.Performance.ServerRefresh -v 10 -u busy_admin

And set the rest of the company to a default of 60 minutes:

p4 property -a -n P4V.Performance.ServerRefresh -v 60

Note: The "-a" flag is only needed when adding a new property; It is possible to create duplicate properties.

Note: There is no error checking on the name of the property, as this is meant to be flexible enough for use with a variety of clients (including those developed using the Perforce APIs). The property name is also case sensitive.

For example, if P4V is looking for P4V.Performance.ServerRefresh, it ignores:




The administrator checks the list of all properties using the -A flag:

p4 property -A -l
P4V.Performance.ServerRefresh = 60 (any) #1
P4V.Performance.ServerRefresh = 10 (user busy_admin) #1
P4V.Performance.ServerRefresh = 25 (group busy_group) #1

In this case (where all of the sequence numbers are the same, as they are here) the last one wins alphabetically. That means busy_admin's P4V will use the group value of 25. In other words, "last match wins".

As this is not what the administrator intended, they would remove two of the entries (for the group and user):

p4 property -d -n P4V.Performance.ServerRefresh -g busy_group
p4 property -d -n P4V.Performance.ServerRefresh -u busy_admin

And then re-add them with the -s flag to set the sequence number, which controls the order lines are applied to a given user or group:

p4 property -a -n P4V.Performance.ServerRefresh -v 25 -g busy_group -s 2
p4 property -a -n P4V.Performance.ServerRefresh -v 10 -u busy_admin -s 3

Note: The "any" listing not specifying a user or group already has the correct value of 1, so it does not need to be deleted or re-added.

The administrator checks the properties again:

p4 property -A -l
P4V.Performance.ServerRefresh = 10 (user busy_admin) #3
P4V.Performance.ServerRefresh = 25 (group busy_group) #2
P4V.Performance.ServerRefresh = 60 (any) #1

Now users in group busy_group will have a P4V server refresh rate of 25 minutes, but busy_admin will have 10 (even as a member of busy_group). Everyone else using P4V will see a 60 minute refresh rate.

Note: Users will need to re-connect through P4V for the changes to take effect.

Note: There is a known issue values set using "p4 property" are not reflected in the preferences window in P4V. However, they will be noted in the "Help | System Info" window. For example, a member of the busy_group in the above example would see this line in the System Info window under the Application heading:

Server refresh interval: 25 minute(s) (pushed from the server)

The "Fundamentals" administrator guide provides further instructions for Configuring P4V Settings

Related Links
Command Reference: p4 key
Command Reference: p4 attribute
Command Reference: p4 counters



Was this article helpful?



Please tell us how we can make this article more useful.

Characters Remaining: 255