{"action":"created","comment":{"url":"https://api.github.com/repos/buildbot/buildbot/pulls/comments/31103601","id":31103601,"diff_hunk":"@@ -83,14 +82,21 @@ def checkInstall(monotoneInstalled):\n                 raise BuildSlaveTooOldError(\"Monotone is not installed on slave\")\n             return 0\n         d.addCallback(lambda _: self._checkDb())\n-        d.addCallback(lambda _: self.sourcedirIsPatched())\n+        d.addCallback(lambda _: self._retryPull())\n \n-        @d.addCallback\n-        def checkPatched(patched):\n-            if patched:\n-                return self.clean()\n-            else:\n-                return 0\n+        # If we're not throwing away the workdir, check if it's\n+        # somehow patched or modified and revert.\n+        if self.mode != 'full' or self.method not in ('clobber', 'copy'):\n+            d.addCallback(lambda _: self.sourcedirIsPatched())\n+\n+            @d.addCallback","path":"master/buildbot/steps/source/mtn.py","position":38,"original_position":38,"commit_id":"84539907b890a8d4312ac50faa3792e1dda2dccd","original_commit_id":"84539907b890a8d4312ac50faa3792e1dda2dccd","user":{"login":"mwanner","id":184024,"avatar_url":"https://avatars.githubusercontent.com/u/184024?v=3","gravatar_id":"","url":"https://api.github.com/users/mwanner","html_url":"https://github.com/mwanner","followers_url":"https://api.github.com/users/mwanner/followers","following_url":"https://api.github.com/users/mwanner/following{/other_user}","gists_url":"https://api.github.com/users/mwanner/gists{/gist_id}","starred_url":"https://api.github.com/users/mwanner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwanner/subscriptions","organizations_url":"https://api.github.com/users/mwanner/orgs","repos_url":"https://api.github.com/users/mwanner/repos","events_url":"https://api.github.com/users/mwanner/events{/privacy}","received_events_url":"https://api.github.com/users/mwanner/received_events","type":"User","site_admin":false},"body":"I tried to keep the patch as small as possible, but am happy to change more of it to inlineCallbacks.","created_at":"2015-05-27T05:06:40Z","updated_at":"2015-05-27T05:06:40Z","html_url":"https://github.com/buildbot/buildbot/pull/1693#discussion_r31103601","pull_request_url":"https://api.github.com/repos/buildbot/buildbot/pulls/1693","_links":{"self":{"href":"https://api.github.com/repos/buildbot/buildbot/pulls/comments/31103601"},"html":{"href":"https://github.com/buildbot/buildbot/pull/1693#discussion_r31103601"},"pull_request":{"href":"https://api.github.com/repos/buildbot/buildbot/pulls/1693"}}},"pull_request":{"url":"https://api.github.com/repos/buildbot/buildbot/pulls/1693","id":36239115,"html_url":"https://github.com/buildbot/buildbot/pull/1693","diff_url":"https://github.com/buildbot/buildbot/pull/1693.diff","patch_url":"https://github.com/buildbot/buildbot/pull/1693.patch","issue_url":"https://api.github.com/repos/buildbot/buildbot/issues/1693","number":1693,"state":"open","locked":false,"title":"Overhaul the monotone source step.","user":{"login":"mwanner","id":184024,"avatar_url":"https://avatars.githubusercontent.com/u/184024?v=3","gravatar_id":"","url":"https://api.github.com/users/mwanner","html_url":"https://github.com/mwanner","followers_url":"https://api.github.com/users/mwanner/followers","following_url":"https://api.github.com/users/mwanner/following{/other_user}","gists_url":"https://api.github.com/users/mwanner/gists{/gist_id}","starred_url":"https://api.github.com/users/mwanner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwanner/subscriptions","organizations_url":"https://api.github.com/users/mwanner/orgs","repos_url":"https://api.github.com/users/mwanner/repos","events_url":"https://api.github.com/users/mwanner/events{/privacy}","received_events_url":"https://api.github.com/users/mwanner/received_events","type":"User","site_admin":false},"body":"This is an overhaul of the monotone source step to improve database handling and correct the errors I found working with the buildbot setup for monotone itself. Given that buildbot itself is still eight-ish, I plan to backport, but would appreciate some review, first.","created_at":"2015-05-26T19:54:57Z","updated_at":"2015-05-27T05:06:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fd81e3bebdf71da6babb5106df989246d13b8b6d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/buildbot/buildbot/pulls/1693/commits","review_comments_url":"https://api.github.com/repos/buildbot/buildbot/pulls/1693/comments","review_comment_url":"https://api.github.com/repos/buildbot/buildbot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/buildbot/buildbot/issues/1693/comments","statuses_url":"https://api.github.com/repos/buildbot/buildbot/statuses/84539907b890a8d4312ac50faa3792e1dda2dccd","head":{"label":"mwanner:overhaul-mtn","ref":"overhaul-mtn","sha":"84539907b890a8d4312ac50faa3792e1dda2dccd","user":{"login":"mwanner","id":184024,"avatar_url":"https://avatars.githubusercontent.com/u/184024?v=3","gravatar_id":"","url":"https://api.github.com/users/mwanner","html_url":"https://github.com/mwanner","followers_url":"https://api.github.com/users/mwanner/followers","following_url":"https://api.github.com/users/mwanner/following{/other_user}","gists_url":"https://api.github.com/users/mwanner/gists{/gist_id}","starred_url":"https://api.github.com/users/mwanner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwanner/subscriptions","organizations_url":"https://api.github.com/users/mwanner/orgs","repos_url":"https://api.github.com/users/mwanner/repos","events_url":"https://api.github.com/users/mwanner/events{/privacy}","received_events_url":"https://api.github.com/users/mwanner/received_events","type":"User","site_admin":false},"repo":{"id":34252061,"name":"buildbot","full_name":"mwanner/buildbot","owner":{"login":"mwanner","id":184024,"avatar_url":"https://avatars.githubusercontent.com/u/184024?v=3","gravatar_id":"","url":"https://api.github.com/users/mwanner","html_url":"https://github.com/mwanner","followers_url":"https://api.github.com/users/mwanner/followers","following_url":"https://api.github.com/users/mwanner/following{/other_user}","gists_url":"https://api.github.com/users/mwanner/gists{/gist_id}","starred_url":"https://api.github.com/users/mwanner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwanner/subscriptions","organizations_url":"https://api.github.com/users/mwanner/orgs","repos_url":"https://api.github.com/users/mwanner/repos","events_url":"https://api.github.com/users/mwanner/events{/privacy}","received_events_url":"https://api.github.com/users/mwanner/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mwanner/buildbot","description":"Python-based continuous integration testing framework; send pull requests for your patches!","fork":true,"url":"https://api.github.com/repos/mwanner/buildbot","forks_url":"https://api.github.com/repos/mwanner/buildbot/forks","keys_url":"https://api.github.com/repos/mwanner/buildbot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mwanner/buildbot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mwanner/buildbot/teams","hooks_url":"https://api.github.com/repos/mwanner/buildbot/hooks","issue_events_url":"https://api.github.com/repos/mwanner/buildbot/issues/events{/number}","events_url":"https://api.github.com/repos/mwanner/buildbot/events","assignees_url":"https://api.github.com/repos/mwanner/buildbot/assignees{/user}","branches_url":"https://api.github.com/repos/mwanner/buildbot/branches{/branch}","tags_url":"https://api.github.com/repos/mwanner/buildbot/tags","blobs_url":"https://api.github.com/repos/mwanner/buildbot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mwanner/buildbot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mwanner/buildbot/git/refs{/sha}","trees_url":"https://api.github.com/repos/mwanner/buildbot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mwanner/buildbot/statuses/{sha}","languages_url":"https://api.github.com/repos/mwanner/buildbot/languages","stargazers_url":"https://api.github.com/repos/mwanner/buildbot/stargazers","contributors_url":"https://api.github.com/repos/mwanner/buildbot/contributors","subscribers_url":"https://api.github.com/repos/mwanner/buildbot/subscribers","subscription_url":"https://api.github.com/repos/mwanner/buildbot/subscription","commits_url":"https://api.github.com/repos/mwanner/buildbot/commits{/sha}","git_commits_url":"https://api.github.com/repos/mwanner/buildbot/git/commits{/sha}","comments_url":"https://api.github.com/repos/mwanner/buildbot/comments{/number}","issue_comment_url":"https://api.github.com/repos/mwanner/buildbot/issues/comments{/number}","contents_url":"https://api.github.com/repos/mwanner/buildbot/contents/{+path}","compare_url":"https://api.github.com/repos/mwanner/buildbot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mwanner/buildbot/merges","archive_url":"https://api.github.com/repos/mwanner/buildbot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mwanner/buildbot/downloads","issues_url":"https://api.github.com/repos/mwanner/buildbot/issues{/number}","pulls_url":"https://api.github.com/repos/mwanner/buildbot/pulls{/number}","milestones_url":"https://api.github.com/repos/mwanner/buildbot/milestones{/number}","notifications_url":"https://api.github.com/repos/mwanner/buildbot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mwanner/buildbot/labels{/name}","releases_url":"https://api.github.com/repos/mwanner/buildbot/releases{/id}","created_at":"2015-04-20T09:43:18Z","updated_at":"2015-04-20T09:43:23Z","pushed_at":"2015-05-26T19:51:23Z","git_url":"git://github.com/mwanner/buildbot.git","ssh_url":"git@github.com:mwanner/buildbot.git","clone_url":"https://github.com/mwanner/buildbot.git","svn_url":"https://github.com/mwanner/buildbot","homepage":"http://buildbot.net","size":35937,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"buildbot:master","ref":"master","sha":"0552bea0d2ca01d029f6a9342f81468a2b0ae145","user":{"login":"buildbot","id":324515,"avatar_url":"https://avatars.githubusercontent.com/u/324515?v=3","gravatar_id":"","url":"https://api.github.com/users/buildbot","html_url":"https://github.com/buildbot","followers_url":"https://api.github.com/users/buildbot/followers","following_url":"https://api.github.com/users/buildbot/following{/other_user}","gists_url":"https://api.github.com/users/buildbot/gists{/gist_id}","starred_url":"https://api.github.com/users/buildbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/buildbot/subscriptions","organizations_url":"https://api.github.com/users/buildbot/orgs","repos_url":"https://api.github.com/users/buildbot/repos","events_url":"https://api.github.com/users/buildbot/events{/privacy}","received_events_url":"https://api.github.com/users/buildbot/received_events","type":"Organization","site_admin":false},"repo":{"id":760165,"name":"buildbot","full_name":"buildbot/buildbot","owner":{"login":"buildbot","id":324515,"avatar_url":"https://avatars.githubusercontent.com/u/324515?v=3","gravatar_id":"","url":"https://api.github.com/users/buildbot","html_url":"https://github.com/buildbot","followers_url":"https://api.github.com/users/buildbot/followers","following_url":"https://api.github.com/users/buildbot/following{/other_user}","gists_url":"https://api.github.com/users/buildbot/gists{/gist_id}","starred_url":"https://api.github.com/users/buildbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/buildbot/subscriptions","organizations_url":"https://api.github.com/users/buildbot/orgs","repos_url":"https://api.github.com/users/buildbot/repos","events_url":"https://api.github.com/users/buildbot/events{/privacy}","received_events_url":"https://api.github.com/users/buildbot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/buildbot/buildbot","description":"Python-based continuous integration testing framework; your pull requests are more than welcome!","fork":false,"url":"https://api.github.com/repos/buildbot/buildbot","forks_url":"https://api.github.com/repos/buildbot/buildbot/forks","keys_url":"https://api.github.com/repos/buildbot/buildbot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/buildbot/buildbot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/buildbot/buildbot/teams","hooks_url":"https://api.github.com/repos/buildbot/buildbot/hooks","issue_events_url":"https://api.github.com/repos/buildbot/buildbot/issues/events{/number}","events_url":"https://api.github.com/repos/buildbot/buildbot/events","assignees_url":"https://api.github.com/repos/buildbot/buildbot/assignees{/user}","branches_url":"https://api.github.com/repos/buildbot/buildbot/branches{/branch}","tags_url":"https://api.github.com/repos/buildbot/buildbot/tags","blobs_url":"https://api.github.com/repos/buildbot/buildbot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/buildbot/buildbot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/buildbot/buildbot/git/refs{/sha}","trees_url":"https://api.github.com/repos/buildbot/buildbot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/buildbot/buildbot/statuses/{sha}","languages_url":"https://api.github.com/repos/buildbot/buildbot/languages","stargazers_url":"https://api.github.com/repos/buildbot/buildbot/stargazers","contributors_url":"https://api.github.com/repos/buildbot/buildbot/contributors","subscribers_url":"https://api.github.com/repos/buildbot/buildbot/subscribers","subscription_url":"https://api.github.com/repos/buildbot/buildbot/subscription","commits_url":"https://api.github.com/repos/buildbot/buildbot/commits{/sha}","git_commits_url":"https://api.github.com/repos/buildbot/buildbot/git/commits{/sha}","comments_url":"https://api.github.com/repos/buildbot/buildbot/comments{/number}","issue_comment_url":"https://api.github.com/repos/buildbot/buildbot/issues/comments{/number}","contents_url":"https://api.github.com/repos/buildbot/buildbot/contents/{+path}","compare_url":"https://api.github.com/repos/buildbot/buildbot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/buildbot/buildbot/merges","archive_url":"https://api.github.com/repos/buildbot/buildbot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/buildbot/buildbot/downloads","issues_url":"https://api.github.com/repos/buildbot/buildbot/issues{/number}","pulls_url":"https://api.github.com/repos/buildbot/buildbot/pulls{/number}","milestones_url":"https://api.github.com/repos/buildbot/buildbot/milestones{/number}","notifications_url":"https://api.github.com/repos/buildbot/buildbot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/buildbot/buildbot/labels{/name}","releases_url":"https://api.github.com/repos/buildbot/buildbot/releases{/id}","created_at":"2010-07-06T17:56:53Z","updated_at":"2015-05-27T02:33:57Z","pushed_at":"2015-05-27T01:29:42Z","git_url":"git://github.com/buildbot/buildbot.git","ssh_url":"git@github.com:buildbot/buildbot.git","clone_url":"https://github.com/buildbot/buildbot.git","svn_url":"https://github.com/buildbot/buildbot","homepage":"http://buildbot.net","size":53915,"stargazers_count":1555,"watchers_count":1555,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":700,"mirror_url":null,"open_issues_count":20,"forks":700,"open_issues":20,"watchers":1555,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/buildbot/buildbot/pulls/1693"},"html":{"href":"https://github.com/buildbot/buildbot/pull/1693"},"issue":{"href":"https://api.github.com/repos/buildbot/buildbot/issues/1693"},"comments":{"href":"https://api.github.com/repos/buildbot/buildbot/issues/1693/comments"},"review_comments":{"href":"https://api.github.com/repos/buildbot/buildbot/pulls/1693/comments"},"review_comment":{"href":"https://api.github.com/repos/buildbot/buildbot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/buildbot/buildbot/pulls/1693/commits"},"statuses":{"href":"https://api.github.com/repos/buildbot/buildbot/statuses/84539907b890a8d4312ac50faa3792e1dda2dccd"}}}}