{"action":"created","comment":{"url":"https://api.github.com/repos/NSLS-II/bluesky/pulls/comments/51897499","id":51897499,"diff_hunk":"@@ -92,9 +92,12 @@ def _pre(self):\n         # itself as its argument and returns a generator of messages\n         if self.pre_run is not None:\n             yield from self.pre_run(self)\n+        staged = []  # to track duplicates","path":"bluesky/plans.py","position":4,"original_position":4,"commit_id":"73d3897c3774fcab33336ef4c4a3bb89a725dd8a","original_commit_id":"73d3897c3774fcab33336ef4c4a3bb89a725dd8a","user":{"login":"danielballan","id":2279598,"avatar_url":"https://avatars.githubusercontent.com/u/2279598?v=3","gravatar_id":"","url":"https://api.github.com/users/danielballan","html_url":"https://github.com/danielballan","followers_url":"https://api.github.com/users/danielballan/followers","following_url":"https://api.github.com/users/danielballan/following{/other_user}","gists_url":"https://api.github.com/users/danielballan/gists{/gist_id}","starred_url":"https://api.github.com/users/danielballan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielballan/subscriptions","organizations_url":"https://api.github.com/users/danielballan/orgs","repos_url":"https://api.github.com/users/danielballan/repos","events_url":"https://api.github.com/users/danielballan/events{/privacy}","received_events_url":"https://api.github.com/users/danielballan/received_events","type":"User","site_admin":false},"body":"Yes. It is a local variable that gets discarded. But first, it tracks duplicates.","created_at":"2016-02-04T16:29:36Z","updated_at":"2016-02-04T16:29:36Z","html_url":"https://github.com/NSLS-II/bluesky/pull/324#discussion_r51897499","pull_request_url":"https://api.github.com/repos/NSLS-II/bluesky/pulls/324","_links":{"self":{"href":"https://api.github.com/repos/NSLS-II/bluesky/pulls/comments/51897499"},"html":{"href":"https://github.com/NSLS-II/bluesky/pull/324#discussion_r51897499"},"pull_request":{"href":"https://api.github.com/repos/NSLS-II/bluesky/pulls/324"}}},"pull_request":{"url":"https://api.github.com/repos/NSLS-II/bluesky/pulls/324","id":58182517,"html_url":"https://github.com/NSLS-II/bluesky/pull/324","diff_url":"https://github.com/NSLS-II/bluesky/pull/324.diff","patch_url":"https://github.com/NSLS-II/bluesky/pull/324.patch","issue_url":"https://api.github.com/repos/NSLS-II/bluesky/issues/324","number":324,"state":"open","locked":false,"title":"FIX: Avoid staging objects redundantly.","user":{"login":"danielballan","id":2279598,"avatar_url":"https://avatars.githubusercontent.com/u/2279598?v=3","gravatar_id":"","url":"https://api.github.com/users/danielballan","html_url":"https://github.com/danielballan","followers_url":"https://api.github.com/users/danielballan/followers","following_url":"https://api.github.com/users/danielballan/following{/other_user}","gists_url":"https://api.github.com/users/danielballan/gists{/gist_id}","starred_url":"https://api.github.com/users/danielballan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielballan/subscriptions","organizations_url":"https://api.github.com/users/danielballan/orgs","repos_url":"https://api.github.com/users/danielballan/repos","events_url":"https://api.github.com/users/danielballan/events{/privacy}","received_events_url":"https://api.github.com/users/danielballan/received_events","type":"User","site_admin":false},"body":"As discovered by @ambarb, if you include your 'motor' as one of your 'detectors' (which is a reasonable thing to do) `Plan` tries to stage it twice and blows up. This is a simple fix.","created_at":"2016-02-03T18:50:28Z","updated_at":"2016-02-04T16:29:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8dcf02da17bc2b372ddbf83fc81d7b258cd3f9d8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/NSLS-II/bluesky/pulls/324/commits","review_comments_url":"https://api.github.com/repos/NSLS-II/bluesky/pulls/324/comments","review_comment_url":"https://api.github.com/repos/NSLS-II/bluesky/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NSLS-II/bluesky/issues/324/comments","statuses_url":"https://api.github.com/repos/NSLS-II/bluesky/statuses/73d3897c3774fcab33336ef4c4a3bb89a725dd8a","head":{"label":"danielballan:fix-stage","ref":"fix-stage","sha":"73d3897c3774fcab33336ef4c4a3bb89a725dd8a","user":{"login":"danielballan","id":2279598,"avatar_url":"https://avatars.githubusercontent.com/u/2279598?v=3","gravatar_id":"","url":"https://api.github.com/users/danielballan","html_url":"https://github.com/danielballan","followers_url":"https://api.github.com/users/danielballan/followers","following_url":"https://api.github.com/users/danielballan/following{/other_user}","gists_url":"https://api.github.com/users/danielballan/gists{/gist_id}","starred_url":"https://api.github.com/users/danielballan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielballan/subscriptions","organizations_url":"https://api.github.com/users/danielballan/orgs","repos_url":"https://api.github.com/users/danielballan/repos","events_url":"https://api.github.com/users/danielballan/events{/privacy}","received_events_url":"https://api.github.com/users/danielballan/received_events","type":"User","site_admin":false},"repo":{"id":39904738,"name":"bluesky","full_name":"danielballan/bluesky","owner":{"login":"danielballan","id":2279598,"avatar_url":"https://avatars.githubusercontent.com/u/2279598?v=3","gravatar_id":"","url":"https://api.github.com/users/danielballan","html_url":"https://github.com/danielballan","followers_url":"https://api.github.com/users/danielballan/followers","following_url":"https://api.github.com/users/danielballan/following{/other_user}","gists_url":"https://api.github.com/users/danielballan/gists{/gist_id}","starred_url":"https://api.github.com/users/danielballan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielballan/subscriptions","organizations_url":"https://api.github.com/users/danielballan/orgs","repos_url":"https://api.github.com/users/danielballan/repos","events_url":"https://api.github.com/users/danielballan/events{/privacy}","received_events_url":"https://api.github.com/users/danielballan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/danielballan/bluesky","description":"a data collection interface","fork":true,"url":"https://api.github.com/repos/danielballan/bluesky","forks_url":"https://api.github.com/repos/danielballan/bluesky/forks","keys_url":"https://api.github.com/repos/danielballan/bluesky/keys{/key_id}","collaborators_url":"https://api.github.com/repos/danielballan/bluesky/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/danielballan/bluesky/teams","hooks_url":"https://api.github.com/repos/danielballan/bluesky/hooks","issue_events_url":"https://api.github.com/repos/danielballan/bluesky/issues/events{/number}","events_url":"https://api.github.com/repos/danielballan/bluesky/events","assignees_url":"https://api.github.com/repos/danielballan/bluesky/assignees{/user}","branches_url":"https://api.github.com/repos/danielballan/bluesky/branches{/branch}","tags_url":"https://api.github.com/repos/danielballan/bluesky/tags","blobs_url":"https://api.github.com/repos/danielballan/bluesky/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/danielballan/bluesky/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/danielballan/bluesky/git/refs{/sha}","trees_url":"https://api.github.com/repos/danielballan/bluesky/git/trees{/sha}","statuses_url":"https://api.github.com/repos/danielballan/bluesky/statuses/{sha}","languages_url":"https://api.github.com/repos/danielballan/bluesky/languages","stargazers_url":"https://api.github.com/repos/danielballan/bluesky/stargazers","contributors_url":"https://api.github.com/repos/danielballan/bluesky/contributors","subscribers_url":"https://api.github.com/repos/danielballan/bluesky/subscribers","subscription_url":"https://api.github.com/repos/danielballan/bluesky/subscription","commits_url":"https://api.github.com/repos/danielballan/bluesky/commits{/sha}","git_commits_url":"https://api.github.com/repos/danielballan/bluesky/git/commits{/sha}","comments_url":"https://api.github.com/repos/danielballan/bluesky/comments{/number}","issue_comment_url":"https://api.github.com/repos/danielballan/bluesky/issues/comments{/number}","contents_url":"https://api.github.com/repos/danielballan/bluesky/contents/{+path}","compare_url":"https://api.github.com/repos/danielballan/bluesky/compare/{base}...{head}","merges_url":"https://api.github.com/repos/danielballan/bluesky/merges","archive_url":"https://api.github.com/repos/danielballan/bluesky/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/danielballan/bluesky/downloads","issues_url":"https://api.github.com/repos/danielballan/bluesky/issues{/number}","pulls_url":"https://api.github.com/repos/danielballan/bluesky/pulls{/number}","milestones_url":"https://api.github.com/repos/danielballan/bluesky/milestones{/number}","notifications_url":"https://api.github.com/repos/danielballan/bluesky/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/danielballan/bluesky/labels{/name}","releases_url":"https://api.github.com/repos/danielballan/bluesky/releases{/id}","deployments_url":"https://api.github.com/repos/danielballan/bluesky/deployments","created_at":"2015-07-29T16:42:41Z","updated_at":"2016-01-27T22:18:04Z","pushed_at":"2016-02-03T19:03:46Z","git_url":"git://github.com/danielballan/bluesky.git","ssh_url":"git@github.com:danielballan/bluesky.git","clone_url":"https://github.com/danielballan/bluesky.git","svn_url":"https://github.com/danielballan/bluesky","homepage":"http://danielballan.github.io/bluesky","size":3198,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"NSLS-II:master","ref":"master","sha":"618d456d324fcd893be78641a1b6ede9e109e720","user":{"login":"NSLS-II","id":8700262,"avatar_url":"https://avatars.githubusercontent.com/u/8700262?v=3","gravatar_id":"","url":"https://api.github.com/users/NSLS-II","html_url":"https://github.com/NSLS-II","followers_url":"https://api.github.com/users/NSLS-II/followers","following_url":"https://api.github.com/users/NSLS-II/following{/other_user}","gists_url":"https://api.github.com/users/NSLS-II/gists{/gist_id}","starred_url":"https://api.github.com/users/NSLS-II/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NSLS-II/subscriptions","organizations_url":"https://api.github.com/users/NSLS-II/orgs","repos_url":"https://api.github.com/users/NSLS-II/repos","events_url":"https://api.github.com/users/NSLS-II/events{/privacy}","received_events_url":"https://api.github.com/users/NSLS-II/received_events","type":"Organization","site_admin":false},"repo":{"id":36754446,"name":"bluesky","full_name":"NSLS-II/bluesky","owner":{"login":"NSLS-II","id":8700262,"avatar_url":"https://avatars.githubusercontent.com/u/8700262?v=3","gravatar_id":"","url":"https://api.github.com/users/NSLS-II","html_url":"https://github.com/NSLS-II","followers_url":"https://api.github.com/users/NSLS-II/followers","following_url":"https://api.github.com/users/NSLS-II/following{/other_user}","gists_url":"https://api.github.com/users/NSLS-II/gists{/gist_id}","starred_url":"https://api.github.com/users/NSLS-II/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NSLS-II/subscriptions","organizations_url":"https://api.github.com/users/NSLS-II/orgs","repos_url":"https://api.github.com/users/NSLS-II/repos","events_url":"https://api.github.com/users/NSLS-II/events{/privacy}","received_events_url":"https://api.github.com/users/NSLS-II/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NSLS-II/bluesky","description":"a data collection interface","fork":false,"url":"https://api.github.com/repos/NSLS-II/bluesky","forks_url":"https://api.github.com/repos/NSLS-II/bluesky/forks","keys_url":"https://api.github.com/repos/NSLS-II/bluesky/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NSLS-II/bluesky/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NSLS-II/bluesky/teams","hooks_url":"https://api.github.com/repos/NSLS-II/bluesky/hooks","issue_events_url":"https://api.github.com/repos/NSLS-II/bluesky/issues/events{/number}","events_url":"https://api.github.com/repos/NSLS-II/bluesky/events","assignees_url":"https://api.github.com/repos/NSLS-II/bluesky/assignees{/user}","branches_url":"https://api.github.com/repos/NSLS-II/bluesky/branches{/branch}","tags_url":"https://api.github.com/repos/NSLS-II/bluesky/tags","blobs_url":"https://api.github.com/repos/NSLS-II/bluesky/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NSLS-II/bluesky/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NSLS-II/bluesky/git/refs{/sha}","trees_url":"https://api.github.com/repos/NSLS-II/bluesky/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NSLS-II/bluesky/statuses/{sha}","languages_url":"https://api.github.com/repos/NSLS-II/bluesky/languages","stargazers_url":"https://api.github.com/repos/NSLS-II/bluesky/stargazers","contributors_url":"https://api.github.com/repos/NSLS-II/bluesky/contributors","subscribers_url":"https://api.github.com/repos/NSLS-II/bluesky/subscribers","subscription_url":"https://api.github.com/repos/NSLS-II/bluesky/subscription","commits_url":"https://api.github.com/repos/NSLS-II/bluesky/commits{/sha}","git_commits_url":"https://api.github.com/repos/NSLS-II/bluesky/git/commits{/sha}","comments_url":"https://api.github.com/repos/NSLS-II/bluesky/comments{/number}","issue_comment_url":"https://api.github.com/repos/NSLS-II/bluesky/issues/comments{/number}","contents_url":"https://api.github.com/repos/NSLS-II/bluesky/contents/{+path}","compare_url":"https://api.github.com/repos/NSLS-II/bluesky/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NSLS-II/bluesky/merges","archive_url":"https://api.github.com/repos/NSLS-II/bluesky/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NSLS-II/bluesky/downloads","issues_url":"https://api.github.com/repos/NSLS-II/bluesky/issues{/number}","pulls_url":"https://api.github.com/repos/NSLS-II/bluesky/pulls{/number}","milestones_url":"https://api.github.com/repos/NSLS-II/bluesky/milestones{/number}","notifications_url":"https://api.github.com/repos/NSLS-II/bluesky/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NSLS-II/bluesky/labels{/name}","releases_url":"https://api.github.com/repos/NSLS-II/bluesky/releases{/id}","deployments_url":"https://api.github.com/repos/NSLS-II/bluesky/deployments","created_at":"2015-06-02T18:50:18Z","updated_at":"2016-01-11T17:00:50Z","pushed_at":"2016-02-03T19:03:47Z","git_url":"git://github.com/NSLS-II/bluesky.git","ssh_url":"git@github.com:NSLS-II/bluesky.git","clone_url":"https://github.com/NSLS-II/bluesky.git","svn_url":"https://github.com/NSLS-II/bluesky","homepage":"http://nsls-ii.github.io/bluesky","size":2598,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":10,"mirror_url":null,"open_issues_count":39,"forks":10,"open_issues":39,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NSLS-II/bluesky/pulls/324"},"html":{"href":"https://github.com/NSLS-II/bluesky/pull/324"},"issue":{"href":"https://api.github.com/repos/NSLS-II/bluesky/issues/324"},"comments":{"href":"https://api.github.com/repos/NSLS-II/bluesky/issues/324/comments"},"review_comments":{"href":"https://api.github.com/repos/NSLS-II/bluesky/pulls/324/comments"},"review_comment":{"href":"https://api.github.com/repos/NSLS-II/bluesky/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NSLS-II/bluesky/pulls/324/commits"},"statuses":{"href":"https://api.github.com/repos/NSLS-II/bluesky/statuses/73d3897c3774fcab33336ef4c4a3bb89a725dd8a"}}}}