When using exclusionary view mappings the label created changes the exclusion to an inclusion.
Example client view:
//depot/Freestyle/... //${P4_CLIENT}/Freestyle/... -//depot/Freestyle/main/sub1/... //${P4_CLIENT}/Freestyle/main/sub1/... -//depot/Freestyle/main/sub2/... //${P4_CLIENT}/Freestyle/main/sub2/... -//depot/Freestyle/main/sub3/... //${P4_CLIENT}/Freestyle/main/sub3/... //depot/sub/... //${P4_CLIENT}/sub/...
Example label produced:
Label: jenkins-LabelTest Owner: jenkins Description: Jenkins post-build label. Options: unlocked noautoreload Revision: @303 View: //depot/Freestyle/... //depot/Freestyle/main/sub1/... //depot/Freestyle/main/sub2/... //depot/Freestyle/main/sub3/... //depot/sub/...
This causes the label to contain more files ('//depot/Freestyle/main/sub*/...') than was included in the build.
Reproduction steps:
(1) Create a freestyle job with exclusionary mappings in the client view (example above).
(2) Add the 'Post Build Action' called 'Perforce:label'.
(3) Save and run the job.
(4) Look at the label generated (p4 label -o LabelName).