Perforce Public Knowledge Base - Using P4IGNORE with P4V
Downloads Blog Company Integrations Careers Contact Try Free
Menu Search
Reset Search



Using P4IGNORE with P4V

« Go Back



Starting with the 2012.3 release, P4V supports P4IGNORE and uses the p4 reconcile command, as noted in this excerpt from the Release Notes:

  Major new functionality in 2012.3

  #529223 (Bug #59030) * **
    P4V now supports 'p4 reconcile'. It also recognizes, and honors P4IGNORE.
    On both Windows and Linux, users can set their P4IGNORE in their environment.
    On the Mac Desktop applications do not launch a shell, but P4V will pick it up,
    if the environment is set using the 'p4 set' command.

Note that you must be running a 2012.1 (or higher) Perforce Server in order to take advantage of the new P4IGNORE functionality.

In order to use this new functionality with P4V two configuration steps are needed:

1) Create a text file in the client root containing a list of the filetype(s) to be ignored.  The name of the file is not important, but we suggest using something meaningful like "p4ignore.txt".

The User's Guide includes a section entitled "Ignoring groups of files when adding" which describes the use of P4IGNORE files. 2) Set the P4IGNORE environment variable to the name of the file you created in step 1 above.  For example:


p4 set P4IGNORE=p4ignore.txt

Restart P4V for the changes to take effect.

Windows Example

  1. Set up a P4V icon on your Windows desktop
  1. Right-click P4V icon, Properties
  1. Change Start in: directory to your client workspace root directory (or it can be a directory of your choice)
  1. Open a command prompt
  1. Set the P4IGNORE variable
p4 set P4IGNORE=C:\Perforce\p4ignore.txt

where E:\Perforce is an existing directory

  1. Create the p4ignore.txt file

In this example we will ignore the addition of any new .o files.

cd C:\Perforce

notepad p4ignore.txt
(type in)
  1. Close and restart P4V
  1. Verify P4IGNORE is working

Attempt to add a .o file in P4V.
Note the message: "The following files were not marked for add, since they are 'ignored'.

Mac Example

  1. Create a .p4ignore file and specify which file types, filenames, or folder names to ignore.
  1. For the Mac P4V to automatically pick up the environment, create a .p4enviro file in the Users home directory: For example:
  1. In the .p4enviro file, add the location of the .p4ignore file. For example:
  1. Close and restart P4V.
  1. Verify P4IGNORE is working.  Attempt to add a file in .p4ignore list.  You should receive a dialog box that reads:
"The following files were not marked for add, since they are 'ignored'."
Related Links



Was this article helpful?



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

Characters Remaining: 255