When P4Publish runs on Windows build slaves it changes the filetype of some 'text' files. This causes extra files to be submitted.
This only started happening after 1.13.0 and is a side effect of JENKINS-59922.
Reproduction Steps:
(1) Add the two attached files to a workspace as filetype 'text'
p4 add -t text example.xml
p4 add -t text example.js
p4 submit -d "Adding as filetype text"
(2) Create a Jenkins job that syncs the files then runs a publish of any changed items.
(3) Run the job on a Windows master or Windows build slave.
The "reconcile -t" detects that the filetype should be utf8 and submits the unchanged file with the new filetype.
P4 Task: publish files to Perforce. ... p4 change -i + ... p4 change -o 26 + ... pending change: 26 ... p4 reopen -c26 //jenkins-built-in-FresstylePublish-0/... + ... p4 change -o 26 + ... p4 opened -Cjenkins-built-in-FresstylePublish-0 //jenkins-built-in-FresstylePublish___ + ... ... edit //depot/project1/example.xml ... submitting files
The filetypes are now 'utf8' and 'text+x':
C:\> p4 filelog //depot/project1/example* //depot/project1/example.js ... #2 change 26 edit on 2025/01/15 by super@jenkins-built-in-FresstylePublish-1 (text+x) 'Submitted by Jenkins. Build: je' ... #1 change 25 add on 2025/01/15 by super@test_ws (text) 'Add with text filetype' //depot/project1/example.xml ... #2 change 26 edit on 2025/01/15 by super@jenkins-built-in-FresstylePublish-1 (utf8) 'Submitted by Jenkins. Build: je' ... #1 change 25 add on 2025/01/15 by super@test_ws (text) 'Add with text filetype'
It would be good if P4-Plugin had an option to disable the filtype option on reconcile during Publish.
[JENKINS-75146] Option to disable filetype detection on reconcile
Attachment | New: example.js [ 63811 ] | |
Attachment | New: example.xml [ 63812 ] |
Labels | New: P4_A P4_VERIFY |
Description |
Original:
When P4Publish runs it changes the filetype of some 'text' files. This causes extra files to be submitted.
This only started happening after 1.13.0 and is a side effect of Reproduction Steps: (1) Add the two attached files to a workspace as filetype 'text' {code:java} p4 add -t text example.xml p4 add -t text example.js p4 submit -d "Adding as filetype text" {code} (2) Create a Jenkins job that syncs the files then runs a publish of any changed items. (3) Run the job. The "reconcile -t" detects that the filetype should be utf8 and submits the unchanged file with the new filetype. {code:java} P4 Task: publish files to Perforce. ... p4 change -i + ... p4 change -o 26 + ... pending change: 26 ... p4 reopen -c26 //jenkins-built-in-FresstylePublish-0/... + ... p4 change -o 26 + ... p4 opened -Cjenkins-built-in-FresstylePublish-0 //jenkins-built-in-FresstylePublish___ + ... ... edit //depot/project1/example.xml ... submitting files {code} The filetypes are now 'utf8' and 'text+x': {code:java} C:\> p4 filelog //depot/project1/example* //depot/project1/example.js ... #2 change 26 edit on 2025/01/15 by super@jenkins-built-in-FresstylePublish-1 (text+x) 'Submitted by Jenkins. Build: je' ... #1 change 25 add on 2025/01/15 by super@test_ws (text) 'Add with text filetype' //depot/project1/example.xml ... #2 change 26 edit on 2025/01/15 by super@jenkins-built-in-FresstylePublish-1 (utf8) 'Submitted by Jenkins. Build: je' ... #1 change 25 add on 2025/01/15 by super@test_ws (text) 'Add with text filetype' {code} It would be good if P4-Plugin had an option to disable the filtype option on reconcile during Publish. |
New:
When P4Publish runs on Windows build slaves it changes the filetype of some 'text' files. This causes extra files to be submitted.
This only started happening after 1.13.0 and is a side effect of *Reproduction Steps:* (1) Add the two attached files to a workspace as filetype 'text' {code:java} p4 add -t text example.xml p4 add -t text example.js p4 submit -d "Adding as filetype text" {code} (2) Create a Jenkins job that syncs the files then runs a publish of any changed items. (3) Run the job on a Windows master or Windows build slave. The "reconcile -t" detects that the filetype should be utf8 and submits the unchanged file with the new filetype. {code:java} P4 Task: publish files to Perforce. ... p4 change -i + ... p4 change -o 26 + ... pending change: 26 ... p4 reopen -c26 //jenkins-built-in-FresstylePublish-0/... + ... p4 change -o 26 + ... p4 opened -Cjenkins-built-in-FresstylePublish-0 //jenkins-built-in-FresstylePublish___ + ... ... edit //depot/project1/example.xml ... submitting files {code} The filetypes are now 'utf8' and 'text+x': {code:java} C:\> p4 filelog //depot/project1/example* //depot/project1/example.js ... #2 change 26 edit on 2025/01/15 by super@jenkins-built-in-FresstylePublish-1 (text+x) 'Submitted by Jenkins. Build: je' ... #1 change 25 add on 2025/01/15 by super@test_ws (text) 'Add with text filetype' //depot/project1/example.xml ... #2 change 26 edit on 2025/01/15 by super@jenkins-built-in-FresstylePublish-1 (utf8) 'Submitted by Jenkins. Build: je' ... #1 change 25 add on 2025/01/15 by super@test_ws (text) 'Add with text filetype' {code} It would be good if P4-Plugin had an option to disable the filtype option on reconcile during Publish. |