Jump to content

Submission of approved review fails in strict enforcement, crlf issue

swarm strict enforcement crlf

  • Please log in to reply
2 replies to this topic

#1 jiriklouda



  • Members
  • Pip
  • 3 posts

Posted 05 May 2016 - 12:54 AM

Here is another issue that I've run into with the strict enforcement in swarm-trigger.sh

A user submits 6 new files, 3 of them text and 3 of them ktext. Files are shelved, review created, upvoted and approved. He will go to submit it, but submission fails with review not matching a change, but when I describe both review and change, it has the same files, fstat is showing the same files and file types.

The difference ends up being in the digest, but the files have not been modified in any way since the review has been submitted. Now this was another couple hours I wish I had back. Anyway, it turns out that the user had Shared Unix/Win CRLF settings. Submitting from windows to a linux server. The text files had no digest issues, but the ktext files had digest changes.

I am not sure if there is some ktext postprocessing that could have forced the CRLF conversion and so change the md5, but either way it was changed. The trigger could certainly be improved to report what kind of changes there are between the review and the changelist.

When the user changed the settings in his P4V to use Unix style endings, the problem went away and he was able to submit his changes.

#2 P4PetrH


    Advanced Member

  • Members
  • PipPipPip
  • 36 posts

Posted 06 May 2016 - 05:12 AM

Hi Jiri,

thanks for the detailed info! When strict triggers are in place, we recalculate digests for ktext files with keywords not expanded, otherwise the file in review vs. the same file in the changelist being submitted could have different digests even if they are exactly same - for example if the file contains $DateTime$ keyword. I guess what you are seeing is that the digests of the same file are different due to CRLF being evaluated differently if the file was created on a different platform.

I will take a look if I can reproduce it and fix it. Sorry it caused you a trouble.


#3 jiriklouda



  • Members
  • Pip
  • 3 posts

Posted 09 May 2016 - 06:13 PM

Thank you, Petr, the quick reply is much appreciated. If you manage to reproduce it and file a bug report, can I have the bug # please to track it? Thank you. -Jiri

Also tagged with one or more of these keywords: swarm, strict enforcement, crlf

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users