{"action":"created","issue":{"url":"https://api.github.com/repos/kamsar/Unicorn/issues/56","labels_url":"https://api.github.com/repos/kamsar/Unicorn/issues/56/labels{/name}","comments_url":"https://api.github.com/repos/kamsar/Unicorn/issues/56/comments","events_url":"https://api.github.com/repos/kamsar/Unicorn/issues/56/events","html_url":"https://github.com/kamsar/Unicorn/issues/56","id":108485756,"number":56,"title":"Issue with __Lock fields not being checked properly","user":{"login":"MacDennis76","id":6223582,"avatar_url":"https://avatars.githubusercontent.com/u/6223582?v=3","gravatar_id":"","url":"https://api.github.com/users/MacDennis76","html_url":"https://github.com/MacDennis76","followers_url":"https://api.github.com/users/MacDennis76/followers","following_url":"https://api.github.com/users/MacDennis76/following{/other_user}","gists_url":"https://api.github.com/users/MacDennis76/gists{/gist_id}","starred_url":"https://api.github.com/users/MacDennis76/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MacDennis76/subscriptions","organizations_url":"https://api.github.com/users/MacDennis76/orgs","repos_url":"https://api.github.com/users/MacDennis76/repos","events_url":"https://api.github.com/users/MacDennis76/events{/privacy}","received_events_url":"https://api.github.com/users/MacDennis76/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-26T18:32:17Z","updated_at":"2015-09-27T04:26:49Z","closed_at":null,"body":"Hi,\r\n\r\nI am currently testing version 3.0-rc5 in combination with Sitecore 6.6.\r\nAll seems to work fine but I am now experiencing an issue with __Lock fields which seem to fail the check if the need to be updated.\r\n\r\nI have the following item, taken from the Unicorn output:\r\n\r\n```\r\n[U] master:/sitecore/templates/Branches/User Defined/Websites/Horeca Toolbox/Quiz/Quiz root/$name/Winner slide (553fcbf5-1834-4707-8fcb-90c0eaf97bf9)\r\n> Field __Lock - nl#1: Serialized , Source \r\n```\r\n\r\nHow many times I do a re-sync, it keeps throwing this message. It also does this with other __Lock fields of other items.\r\n\r\nThe serialized data contains:\r\n\r\n```\r\n- Language: nl\r\n  Versions:\r\n  - Version: 1\r\n    Fields:\r\n    - ID: 001dd393-96c5-490b-924a-b0f25cd9efd8\r\n      # __Lock\r\n      Value: <r />\r\n```\r\n\r\nIt does have a value equal to <r /> but this is not present in the Unicorn output. Perhaps HTML tags are not displayed properly?\r\n\r\nData in target Sitecore environment before and after sync:\r\n\r\n```\r\nnl version of item: <r />\r\nen version of item: \r\nen-gb version of item: this language version was not created\r\n```\r\n\r\n```\r\nAs you can see the nl version already contains <r /> and the serialized data does as well. But Unicorn still want to update this field with every sync.\r\n```\r\n\r\nAny ideas?\r\n\r\nKind regards,\r\nDennis\r\n"},"comment":{"url":"https://api.github.com/repos/kamsar/Unicorn/issues/comments/143516858","html_url":"https://github.com/kamsar/Unicorn/issues/56#issuecomment-143516858","issue_url":"https://api.github.com/repos/kamsar/Unicorn/issues/56","id":143516858,"user":{"login":"kamsar","id":103677,"avatar_url":"https://avatars.githubusercontent.com/u/103677?v=3","gravatar_id":"","url":"https://api.github.com/users/kamsar","html_url":"https://github.com/kamsar","followers_url":"https://api.github.com/users/kamsar/followers","following_url":"https://api.github.com/users/kamsar/following{/other_user}","gists_url":"https://api.github.com/users/kamsar/gists{/gist_id}","starred_url":"https://api.github.com/users/kamsar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kamsar/subscriptions","organizations_url":"https://api.github.com/users/kamsar/orgs","repos_url":"https://api.github.com/users/kamsar/repos","events_url":"https://api.github.com/users/kamsar/events{/privacy}","received_events_url":"https://api.github.com/users/kamsar/received_events","type":"User","site_admin":false},"created_at":"2015-09-27T04:26:49Z","updated_at":"2015-09-27T04:26:49Z","body":"Hmm, I can't seem to replicate that on 7.2 U5 which is the oldest thing I have handy. The `<r />` values and blank values \r\n\r\nThe message (`>`) indicates that the comparison is occurring in the Rainbow `ItemComparer`. For `__Lock`, there are no custom comparers being used so it'd use the `DefaultComparison` https://github.com/kamsar/Rainbow/blob/master/src/Rainbow/Diff/Fields/DefaultComparison.cs which is a simple `string.Equals()` (case sensitive, culture aware).\r\n\r\nFor diagnostics, you can hook in a custom comparison based on something like https://github.com/kamsar/Rainbow/blob/master/src/Rainbow/Diff/Fields/FieldTypeBasedComparison.cs that targets `__Lock` specifically. This is registered on the `<itemComparer>` in `Unicorn.config`. At that point you can drop into the debugger and see what's going on with the comparison.\r\n\r\nThat said, I'd call `__Lock` a field that probably generally belongs on the ignore list by default, which I'll rectify in a minute for the next default config :)"}}