Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-75146

Option to disable filetype detection on reconcile

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • p4-plugin
    • 1.16.0

      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.

       

        1. example.js
          0.1 kB
          Karl Wirth
        2. example.xml
          0.4 kB
          Karl Wirth

            Unassigned Unassigned
            p4karl Karl Wirth
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: