{"action":"created","comment":{"url":"https://api.github.com/repos/EugenMayer/docker-sync/pulls/comments/73187052","id":73187052,"diff_hunk":"@@ -23,7 +23,7 @@ def initialize(sync_name, options)\n         if @options.key?('image')\n           @docker_image = @options['image']\n         else\n-          @docker_image = 'eugenmayer/unison'\n+          @docker_image = 'eugenmayer/unison:unox'","path":"lib/docker-sync/sync_strategy/unison.rb","position":null,"original_position":5,"commit_id":"5f288f2e205caae5b8bcba58fa2b6b9a1d7c5a31","original_commit_id":"b569ac27c3ecc42339e420649cbd3e902df7f06f","user":{"login":"EugenMayer","id":136934,"avatar_url":"https://avatars.githubusercontent.com/u/136934?v=3","gravatar_id":"","url":"https://api.github.com/users/EugenMayer","html_url":"https://github.com/EugenMayer","followers_url":"https://api.github.com/users/EugenMayer/followers","following_url":"https://api.github.com/users/EugenMayer/following{/other_user}","gists_url":"https://api.github.com/users/EugenMayer/gists{/gist_id}","starred_url":"https://api.github.com/users/EugenMayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EugenMayer/subscriptions","organizations_url":"https://api.github.com/users/EugenMayer/orgs","repos_url":"https://api.github.com/users/EugenMayer/repos","events_url":"https://api.github.com/users/EugenMayer/events{/privacy}","received_events_url":"https://api.github.com/users/EugenMayer/received_events","type":"User","site_admin":false},"body":"thanks, that makes our live a bit easier regarding the upgrade process","created_at":"2016-08-02T16:13:51Z","updated_at":"2016-08-02T16:13:51Z","html_url":"https://github.com/EugenMayer/docker-sync/pull/64#discussion_r73187052","pull_request_url":"https://api.github.com/repos/EugenMayer/docker-sync/pulls/64","_links":{"self":{"href":"https://api.github.com/repos/EugenMayer/docker-sync/pulls/comments/73187052"},"html":{"href":"https://github.com/EugenMayer/docker-sync/pull/64#discussion_r73187052"},"pull_request":{"href":"https://api.github.com/repos/EugenMayer/docker-sync/pulls/64"}}},"pull_request":{"url":"https://api.github.com/repos/EugenMayer/docker-sync/pulls/64","id":78352927,"html_url":"https://github.com/EugenMayer/docker-sync/pull/64","diff_url":"https://github.com/EugenMayer/docker-sync/pull/64.diff","patch_url":"https://github.com/EugenMayer/docker-sync/pull/64.patch","issue_url":"https://api.github.com/repos/EugenMayer/docker-sync/issues/64","number":64,"state":"open","locked":false,"title":"Unison dual-sync feature `unox` for efficient syncing and with user/id mapping","user":{"login":"mickaelperrin","id":5844226,"avatar_url":"https://avatars.githubusercontent.com/u/5844226?v=3","gravatar_id":"","url":"https://api.github.com/users/mickaelperrin","html_url":"https://github.com/mickaelperrin","followers_url":"https://api.github.com/users/mickaelperrin/followers","following_url":"https://api.github.com/users/mickaelperrin/following{/other_user}","gists_url":"https://api.github.com/users/mickaelperrin/gists{/gist_id}","starred_url":"https://api.github.com/users/mickaelperrin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mickaelperrin/subscriptions","organizations_url":"https://api.github.com/users/mickaelperrin/orgs","repos_url":"https://api.github.com/users/mickaelperrin/repos","events_url":"https://api.github.com/users/mickaelperrin/events{/privacy}","received_events_url":"https://api.github.com/users/mickaelperrin/received_events","type":"User","site_admin":false},"body":"While working on #42, I learned a lot of things about `unison`, some were already pointed partially by contributors (@gagarine and @onnimonni, thanks for making me think about that).\r\n\r\n1. There is no absoluty need to run unison with `root` and use `--user` and `--numericids`. Running `unison` under the user we want is sufficient.\r\n\r\n2. Unison is very efficient when used with the option `-repeat watch`. It follows events in realtime and update its index in realtime while performing sync. When used in conjunction with `fsevents`, it needs to scan all folder on each request to update it's index.\r\n\r\n3. There is no need to run a server on each side. A simple call of unison with `-socket` can handle both sync and watch on **both** sides.\r\n\r\nPoint 2 and 3 are true, if the system is compatible with `unison-fsmonitor`. On Mac, you need to install [`unox`](https://github.com/hnsl/unox) to get it working.\r\n\r\nThis PR introduces : \r\n- a new sync strategy `unison-unox``\r\n- a new watch strategy `unison`\r\n- an example\r\n\r\nThe adequate `unison` image is [currently here](https://github.com/mickaelperrin/docker-unison-unox). I won't push a PR for `docker-unison` because it is so much simpler than the actual image. Feel free to grab it under your Github account.\r\n\r\nI am not sure of the updates of the `execution.rb` and `sync_manager.rb`. I wasn't able to get unison working as a new thread, I needed to fork it. This is a problem because, the `.join` method no longer prevents the main process to exit if you use only this strategy. I use a silly hack with `sleep`, sure there is better implementation than that. But my 1 week experience with ruby prevent me to find a better way ;)\r\n\r\nHope we will get some good results with this new strategy, until the `OSXFS` #42 approach will be patched on the Docker side.\r\n","created_at":"2016-07-21T17:09:47Z","updated_at":"2016-08-02T16:13:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2cd02593c5b1e435251a13ed44fb37a02501d18d","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/EugenMayer/docker-sync/milestones/7","html_url":"https://github.com/EugenMayer/docker-sync/milestones/0.1.0","labels_url":"https://api.github.com/repos/EugenMayer/docker-sync/milestones/7/labels","id":1902334,"number":7,"title":"0.1.0","description":"","creator":{"login":"EugenMayer","id":136934,"avatar_url":"https://avatars.githubusercontent.com/u/136934?v=3","gravatar_id":"","url":"https://api.github.com/users/EugenMayer","html_url":"https://github.com/EugenMayer","followers_url":"https://api.github.com/users/EugenMayer/followers","following_url":"https://api.github.com/users/EugenMayer/following{/other_user}","gists_url":"https://api.github.com/users/EugenMayer/gists{/gist_id}","starred_url":"https://api.github.com/users/EugenMayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EugenMayer/subscriptions","organizations_url":"https://api.github.com/users/EugenMayer/orgs","repos_url":"https://api.github.com/users/EugenMayer/repos","events_url":"https://api.github.com/users/EugenMayer/events{/privacy}","received_events_url":"https://api.github.com/users/EugenMayer/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":2,"state":"open","created_at":"2016-07-25T12:44:47Z","updated_at":"2016-08-01T16:47:59Z","due_on":"2016-07-30T22:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/EugenMayer/docker-sync/pulls/64/commits","review_comments_url":"https://api.github.com/repos/EugenMayer/docker-sync/pulls/64/comments","review_comment_url":"https://api.github.com/repos/EugenMayer/docker-sync/pulls/comments{/number}","comments_url":"https://api.github.com/repos/EugenMayer/docker-sync/issues/64/comments","statuses_url":"https://api.github.com/repos/EugenMayer/docker-sync/statuses/5f288f2e205caae5b8bcba58fa2b6b9a1d7c5a31","head":{"label":"mickaelperrin:feature/unox","ref":"feature/unox","sha":"5f288f2e205caae5b8bcba58fa2b6b9a1d7c5a31","user":{"login":"mickaelperrin","id":5844226,"avatar_url":"https://avatars.githubusercontent.com/u/5844226?v=3","gravatar_id":"","url":"https://api.github.com/users/mickaelperrin","html_url":"https://github.com/mickaelperrin","followers_url":"https://api.github.com/users/mickaelperrin/followers","following_url":"https://api.github.com/users/mickaelperrin/following{/other_user}","gists_url":"https://api.github.com/users/mickaelperrin/gists{/gist_id}","starred_url":"https://api.github.com/users/mickaelperrin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mickaelperrin/subscriptions","organizations_url":"https://api.github.com/users/mickaelperrin/orgs","repos_url":"https://api.github.com/users/mickaelperrin/repos","events_url":"https://api.github.com/users/mickaelperrin/events{/privacy}","received_events_url":"https://api.github.com/users/mickaelperrin/received_events","type":"User","site_admin":false},"repo":{"id":63281282,"name":"docker-sync","full_name":"mickaelperrin/docker-sync","owner":{"login":"mickaelperrin","id":5844226,"avatar_url":"https://avatars.githubusercontent.com/u/5844226?v=3","gravatar_id":"","url":"https://api.github.com/users/mickaelperrin","html_url":"https://github.com/mickaelperrin","followers_url":"https://api.github.com/users/mickaelperrin/followers","following_url":"https://api.github.com/users/mickaelperrin/following{/other_user}","gists_url":"https://api.github.com/users/mickaelperrin/gists{/gist_id}","starred_url":"https://api.github.com/users/mickaelperrin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mickaelperrin/subscriptions","organizations_url":"https://api.github.com/users/mickaelperrin/orgs","repos_url":"https://api.github.com/users/mickaelperrin/repos","events_url":"https://api.github.com/users/mickaelperrin/events{/privacy}","received_events_url":"https://api.github.com/users/mickaelperrin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mickaelperrin/docker-sync","description":"Run your application at full speed while syncing your code for development, finally empowering you to utilize docker for development under OSX","fork":true,"url":"https://api.github.com/repos/mickaelperrin/docker-sync","forks_url":"https://api.github.com/repos/mickaelperrin/docker-sync/forks","keys_url":"https://api.github.com/repos/mickaelperrin/docker-sync/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mickaelperrin/docker-sync/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mickaelperrin/docker-sync/teams","hooks_url":"https://api.github.com/repos/mickaelperrin/docker-sync/hooks","issue_events_url":"https://api.github.com/repos/mickaelperrin/docker-sync/issues/events{/number}","events_url":"https://api.github.com/repos/mickaelperrin/docker-sync/events","assignees_url":"https://api.github.com/repos/mickaelperrin/docker-sync/assignees{/user}","branches_url":"https://api.github.com/repos/mickaelperrin/docker-sync/branches{/branch}","tags_url":"https://api.github.com/repos/mickaelperrin/docker-sync/tags","blobs_url":"https://api.github.com/repos/mickaelperrin/docker-sync/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mickaelperrin/docker-sync/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mickaelperrin/docker-sync/git/refs{/sha}","trees_url":"https://api.github.com/repos/mickaelperrin/docker-sync/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mickaelperrin/docker-sync/statuses/{sha}","languages_url":"https://api.github.com/repos/mickaelperrin/docker-sync/languages","stargazers_url":"https://api.github.com/repos/mickaelperrin/docker-sync/stargazers","contributors_url":"https://api.github.com/repos/mickaelperrin/docker-sync/contributors","subscribers_url":"https://api.github.com/repos/mickaelperrin/docker-sync/subscribers","subscription_url":"https://api.github.com/repos/mickaelperrin/docker-sync/subscription","commits_url":"https://api.github.com/repos/mickaelperrin/docker-sync/commits{/sha}","git_commits_url":"https://api.github.com/repos/mickaelperrin/docker-sync/git/commits{/sha}","comments_url":"https://api.github.com/repos/mickaelperrin/docker-sync/comments{/number}","issue_comment_url":"https://api.github.com/repos/mickaelperrin/docker-sync/issues/comments{/number}","contents_url":"https://api.github.com/repos/mickaelperrin/docker-sync/contents/{+path}","compare_url":"https://api.github.com/repos/mickaelperrin/docker-sync/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mickaelperrin/docker-sync/merges","archive_url":"https://api.github.com/repos/mickaelperrin/docker-sync/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mickaelperrin/docker-sync/downloads","issues_url":"https://api.github.com/repos/mickaelperrin/docker-sync/issues{/number}","pulls_url":"https://api.github.com/repos/mickaelperrin/docker-sync/pulls{/number}","milestones_url":"https://api.github.com/repos/mickaelperrin/docker-sync/milestones{/number}","notifications_url":"https://api.github.com/repos/mickaelperrin/docker-sync/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mickaelperrin/docker-sync/labels{/name}","releases_url":"https://api.github.com/repos/mickaelperrin/docker-sync/releases{/id}","deployments_url":"https://api.github.com/repos/mickaelperrin/docker-sync/deployments","created_at":"2016-07-13T21:37:12Z","updated_at":"2016-07-13T21:37:12Z","pushed_at":"2016-08-02T10:11:49Z","git_url":"git://github.com/mickaelperrin/docker-sync.git","ssh_url":"git@github.com:mickaelperrin/docker-sync.git","clone_url":"https://github.com/mickaelperrin/docker-sync.git","svn_url":"https://github.com/mickaelperrin/docker-sync","homepage":"","size":180,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"EugenMayer:master","ref":"master","sha":"cac7e5f9a042ec3bd8613e779443753d7261ec2b","user":{"login":"EugenMayer","id":136934,"avatar_url":"https://avatars.githubusercontent.com/u/136934?v=3","gravatar_id":"","url":"https://api.github.com/users/EugenMayer","html_url":"https://github.com/EugenMayer","followers_url":"https://api.github.com/users/EugenMayer/followers","following_url":"https://api.github.com/users/EugenMayer/following{/other_user}","gists_url":"https://api.github.com/users/EugenMayer/gists{/gist_id}","starred_url":"https://api.github.com/users/EugenMayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EugenMayer/subscriptions","organizations_url":"https://api.github.com/users/EugenMayer/orgs","repos_url":"https://api.github.com/users/EugenMayer/repos","events_url":"https://api.github.com/users/EugenMayer/events{/privacy}","received_events_url":"https://api.github.com/users/EugenMayer/received_events","type":"User","site_admin":false},"repo":{"id":62890617,"name":"docker-sync","full_name":"EugenMayer/docker-sync","owner":{"login":"EugenMayer","id":136934,"avatar_url":"https://avatars.githubusercontent.com/u/136934?v=3","gravatar_id":"","url":"https://api.github.com/users/EugenMayer","html_url":"https://github.com/EugenMayer","followers_url":"https://api.github.com/users/EugenMayer/followers","following_url":"https://api.github.com/users/EugenMayer/following{/other_user}","gists_url":"https://api.github.com/users/EugenMayer/gists{/gist_id}","starred_url":"https://api.github.com/users/EugenMayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EugenMayer/subscriptions","organizations_url":"https://api.github.com/users/EugenMayer/orgs","repos_url":"https://api.github.com/users/EugenMayer/repos","events_url":"https://api.github.com/users/EugenMayer/events{/privacy}","received_events_url":"https://api.github.com/users/EugenMayer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/EugenMayer/docker-sync","description":"Run your application at full speed while syncing your code for development, finally empowering you to utilize docker for development under OSX","fork":false,"url":"https://api.github.com/repos/EugenMayer/docker-sync","forks_url":"https://api.github.com/repos/EugenMayer/docker-sync/forks","keys_url":"https://api.github.com/repos/EugenMayer/docker-sync/keys{/key_id}","collaborators_url":"https://api.github.com/repos/EugenMayer/docker-sync/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/EugenMayer/docker-sync/teams","hooks_url":"https://api.github.com/repos/EugenMayer/docker-sync/hooks","issue_events_url":"https://api.github.com/repos/EugenMayer/docker-sync/issues/events{/number}","events_url":"https://api.github.com/repos/EugenMayer/docker-sync/events","assignees_url":"https://api.github.com/repos/EugenMayer/docker-sync/assignees{/user}","branches_url":"https://api.github.com/repos/EugenMayer/docker-sync/branches{/branch}","tags_url":"https://api.github.com/repos/EugenMayer/docker-sync/tags","blobs_url":"https://api.github.com/repos/EugenMayer/docker-sync/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/EugenMayer/docker-sync/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/EugenMayer/docker-sync/git/refs{/sha}","trees_url":"https://api.github.com/repos/EugenMayer/docker-sync/git/trees{/sha}","statuses_url":"https://api.github.com/repos/EugenMayer/docker-sync/statuses/{sha}","languages_url":"https://api.github.com/repos/EugenMayer/docker-sync/languages","stargazers_url":"https://api.github.com/repos/EugenMayer/docker-sync/stargazers","contributors_url":"https://api.github.com/repos/EugenMayer/docker-sync/contributors","subscribers_url":"https://api.github.com/repos/EugenMayer/docker-sync/subscribers","subscription_url":"https://api.github.com/repos/EugenMayer/docker-sync/subscription","commits_url":"https://api.github.com/repos/EugenMayer/docker-sync/commits{/sha}","git_commits_url":"https://api.github.com/repos/EugenMayer/docker-sync/git/commits{/sha}","comments_url":"https://api.github.com/repos/EugenMayer/docker-sync/comments{/number}","issue_comment_url":"https://api.github.com/repos/EugenMayer/docker-sync/issues/comments{/number}","contents_url":"https://api.github.com/repos/EugenMayer/docker-sync/contents/{+path}","compare_url":"https://api.github.com/repos/EugenMayer/docker-sync/compare/{base}...{head}","merges_url":"https://api.github.com/repos/EugenMayer/docker-sync/merges","archive_url":"https://api.github.com/repos/EugenMayer/docker-sync/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/EugenMayer/docker-sync/downloads","issues_url":"https://api.github.com/repos/EugenMayer/docker-sync/issues{/number}","pulls_url":"https://api.github.com/repos/EugenMayer/docker-sync/pulls{/number}","milestones_url":"https://api.github.com/repos/EugenMayer/docker-sync/milestones{/number}","notifications_url":"https://api.github.com/repos/EugenMayer/docker-sync/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/EugenMayer/docker-sync/labels{/name}","releases_url":"https://api.github.com/repos/EugenMayer/docker-sync/releases{/id}","deployments_url":"https://api.github.com/repos/EugenMayer/docker-sync/deployments","created_at":"2016-07-08T13:27:42Z","updated_at":"2016-08-02T15:58:45Z","pushed_at":"2016-08-02T10:11:50Z","git_url":"git://github.com/EugenMayer/docker-sync.git","ssh_url":"git@github.com:EugenMayer/docker-sync.git","clone_url":"https://github.com/EugenMayer/docker-sync.git","svn_url":"https://github.com/EugenMayer/docker-sync","homepage":"","size":183,"stargazers_count":61,"watchers_count":61,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":3,"mirror_url":null,"open_issues_count":16,"forks":3,"open_issues":16,"watchers":61,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/EugenMayer/docker-sync/pulls/64"},"html":{"href":"https://github.com/EugenMayer/docker-sync/pull/64"},"issue":{"href":"https://api.github.com/repos/EugenMayer/docker-sync/issues/64"},"comments":{"href":"https://api.github.com/repos/EugenMayer/docker-sync/issues/64/comments"},"review_comments":{"href":"https://api.github.com/repos/EugenMayer/docker-sync/pulls/64/comments"},"review_comment":{"href":"https://api.github.com/repos/EugenMayer/docker-sync/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/EugenMayer/docker-sync/pulls/64/commits"},"statuses":{"href":"https://api.github.com/repos/EugenMayer/docker-sync/statuses/5f288f2e205caae5b8bcba58fa2b6b9a1d7c5a31"}}}}
{"actor":{"display_login":"EugenMayer"}}