p4 ignores
Displays the ignore mappings computed from the rules in P4IGNORE files.
Syntax
p4 [g-opts] ignores [-v] [path ...]
p4 [g-opts] ignores -i [-v] path ...
Description
It’s not always easy to tell why a file is being ignored during add (p4 add) and
reconcile (p4 reconcile) operations. To help with that, p4 ignores
lets you see the mappings in
Perforce
syntax that are applied for any specified path.
If you do not specify a path, the mappings for the current working directory are displayed.
Using the -v
option outputs the rule that generated mappings and the
line number in the file where the rule is defined. See Examples.
The -i
option checks whether a filepath would be ignored. If so, the path is returned. With the -v
option, a
more verbose message is returned explaining whether the filepath would be
ignored and if it matched any ignore rules.
Default ignored paths
The P4 and P4V clients by default ignore the following paths to allow better co-existence with the DVCS personal server functionality:
.../.p4root/... .../.p4root
If the P4CONFIG variable is in use, the following path is also included:
.../.p4config
Options
|
Test to see if the specified filepath would be ignored. |
|
Report additional information about the When listing mappings, include the rules from which they were generated. When testing a filepath, include the rule that affected the output. |
|
The path to be tested. Specify the path using local syntax. |
|
See Global options. |
Usage notes
Can File Arguments Use Revision Specifier? | Can File Arguments Use Revision Range? | Minimal Access Level Required |
---|---|---|
No |
No |
|
Examples
Note that in the following table, the commands in the left-hand column
were run in the c:\workspace
directory.
|
Display a list of mappings generated from .../.p4root/... .../.p4root .../.p4config/... .../.p4config c:/workspace/.../builds/... c:/workspace/builds/... c:/workspace/.../builds c:/workspace/builds |
Display a list of mappings generated from #FILE - defaults #LINE 2:**/.p4root .../.p4root/... .../.p4root #LINE 1:**/.p4config .../.p4config/... .../.p4config #FILE c:\workspace\.p4ignore #LINE 1:builds c:/workspace/.../builds/... c:/workspace/builds/... c:/workspace/.../builds c:/workspace/builds If the p4 client is on Windows, the name of the rules file might be #FILE - defaults #LINE 1:**/.p4root .../.p4root/... .../.p4root #FILE c:\workspace\p4ignore.txt #LINE 2:*.html c:/workspace/....html/... c:/workspace/....html/ |
|
|
Test to see whether c:\workspace\builds\file2 ignored |
|
Test to see whether c:\workspace\file1 not ignored c:\workspace\builds\file2 ignored by c:\workspace\.p4ignore:1:builds |