{"action":"created","comment":{"url":"https://api.github.com/repos/yast/yast-storage/pulls/comments/53196840","id":53196840,"diff_hunk":"@@ -0,0 +1,152 @@\n+# Copyright (c) 2016 Novell, Inc.\n+#\n+# All Rights Reserved.\n+#\n+# This program is free software; you can redistribute it and/or modify it\n+# under the terms of version 2 of the GNU General Public License as published\n+# by the Free Software Foundation.\n+#\n+# This program is distributed in the hope that it will be useful, but WITHOUT\n+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for\n+# more details.\n+#\n+# You should have received a copy of the GNU General Public License along\n+# with this program; if not, contact SUSE.\n+#\n+# To contact SUSE about this file by physical or electronic mail, you may\n+# find current contact information at www.suse.com.\n+\n+require \"yast\"\n+require \"storage/shadowed_vol_list\"\n+\n+Yast.import \"Storage\"\n+\n+module Yast\n+  # Class implementing user-friendly subvolumes handling for the expert\n+  # partitioner as described in fate#320296\n+  #\n+  # It operates based on the information contained in the specified target_map.\n+  #\n+  # It holds a global list of deleted subvolumes to make possible to restore\n+  # them during the same execution of the expert partitioner.\n+  # @see .cleanup\n+  class ShadowedVolHelper\n+    include Yast::Logger\n+\n+    attr_reader :target_map\n+\n+    def initialize(target_map: Storage.GetTargetMap)\n+      @target_map = target_map\n+    end\n+\n+    # Copy of the root partition with all the shadowed subvolumes marked for\n+    # deletion and with the previously deleted subvolumes restored if they are\n+    # not shadowed anymore\n+    #\n+    # In order to make the recovery of previously deleted subvolumes possible,\n+    # it stores the deleted volumes in a class variable. This list needs to be\n+    # cleaned between subsequent calls to the expert partitioner.\n+    # @see .cleanup\n+    def root_partition\n+      log.info \" shadowed subvolumes\"","path":"src/lib/storage/shadowed_vol_helper.rb","position":52,"original_position":52,"commit_id":"7323ba4193efa9bc647366f1db164738ad30ad84","original_commit_id":"7323ba4193efa9bc647366f1db164738ad30ad84","user":{"login":"ancorgs","id":3638289,"avatar_url":"https://avatars.githubusercontent.com/u/3638289?v=3","gravatar_id":"","url":"https://api.github.com/users/ancorgs","html_url":"https://github.com/ancorgs","followers_url":"https://api.github.com/users/ancorgs/followers","following_url":"https://api.github.com/users/ancorgs/following{/other_user}","gists_url":"https://api.github.com/users/ancorgs/gists{/gist_id}","starred_url":"https://api.github.com/users/ancorgs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ancorgs/subscriptions","organizations_url":"https://api.github.com/users/ancorgs/orgs","repos_url":"https://api.github.com/users/ancorgs/repos","events_url":"https://api.github.com/users/ancorgs/events{/privacy}","received_events_url":"https://api.github.com/users/ancorgs/received_events","type":"User","site_admin":false},"body":"Yep, it definitely looks like a leftover.","created_at":"2016-02-17T17:10:08Z","updated_at":"2016-02-17T17:10:08Z","html_url":"https://github.com/yast/yast-storage/pull/191#discussion_r53196840","pull_request_url":"https://api.github.com/repos/yast/yast-storage/pulls/191","_links":{"self":{"href":"https://api.github.com/repos/yast/yast-storage/pulls/comments/53196840"},"html":{"href":"https://github.com/yast/yast-storage/pull/191#discussion_r53196840"},"pull_request":{"href":"https://api.github.com/repos/yast/yast-storage/pulls/191"}}},"pull_request":{"url":"https://api.github.com/repos/yast/yast-storage/pulls/191","id":59523327,"html_url":"https://github.com/yast/yast-storage/pull/191","diff_url":"https://github.com/yast/yast-storage/pull/191.diff","patch_url":"https://github.com/yast/yast-storage/pull/191.patch","issue_url":"https://api.github.com/repos/yast/yast-storage/issues/191","number":191,"state":"open","locked":false,"title":"Expert partitioner: userfrienly management of subvolumes (fate#320296)","user":{"login":"ancorgs","id":3638289,"avatar_url":"https://avatars.githubusercontent.com/u/3638289?v=3","gravatar_id":"","url":"https://api.github.com/users/ancorgs","html_url":"https://github.com/ancorgs","followers_url":"https://api.github.com/users/ancorgs/followers","following_url":"https://api.github.com/users/ancorgs/following{/other_user}","gists_url":"https://api.github.com/users/ancorgs/gists{/gist_id}","starred_url":"https://api.github.com/users/ancorgs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ancorgs/subscriptions","organizations_url":"https://api.github.com/users/ancorgs/orgs","repos_url":"https://api.github.com/users/ancorgs/repos","events_url":"https://api.github.com/users/ancorgs/events{/privacy}","received_events_url":"https://api.github.com/users/ancorgs/received_events","type":"User","site_admin":false},"body":"This still lacks documentation and tests. Moreover `update_subvols` and `cleanup` has to be called in some more places. Creating the PR only for others to continue my work if I die tomorrow... or become millionaire","created_at":"2016-02-16T17:18:57Z","updated_at":"2016-02-17T17:10:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b11ad2bd4aeb663e597fc0efe92201e2c66d7231","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/yast/yast-storage/pulls/191/commits","review_comments_url":"https://api.github.com/repos/yast/yast-storage/pulls/191/comments","review_comment_url":"https://api.github.com/repos/yast/yast-storage/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yast/yast-storage/issues/191/comments","statuses_url":"https://api.github.com/repos/yast/yast-storage/statuses/7323ba4193efa9bc647366f1db164738ad30ad84","head":{"label":"ancorgs:even_more_subvolumes","ref":"even_more_subvolumes","sha":"7323ba4193efa9bc647366f1db164738ad30ad84","user":{"login":"ancorgs","id":3638289,"avatar_url":"https://avatars.githubusercontent.com/u/3638289?v=3","gravatar_id":"","url":"https://api.github.com/users/ancorgs","html_url":"https://github.com/ancorgs","followers_url":"https://api.github.com/users/ancorgs/followers","following_url":"https://api.github.com/users/ancorgs/following{/other_user}","gists_url":"https://api.github.com/users/ancorgs/gists{/gist_id}","starred_url":"https://api.github.com/users/ancorgs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ancorgs/subscriptions","organizations_url":"https://api.github.com/users/ancorgs/orgs","repos_url":"https://api.github.com/users/ancorgs/repos","events_url":"https://api.github.com/users/ancorgs/events{/privacy}","received_events_url":"https://api.github.com/users/ancorgs/received_events","type":"User","site_admin":false},"repo":{"id":50839440,"name":"yast-storage","full_name":"ancorgs/yast-storage","owner":{"login":"ancorgs","id":3638289,"avatar_url":"https://avatars.githubusercontent.com/u/3638289?v=3","gravatar_id":"","url":"https://api.github.com/users/ancorgs","html_url":"https://github.com/ancorgs","followers_url":"https://api.github.com/users/ancorgs/followers","following_url":"https://api.github.com/users/ancorgs/following{/other_user}","gists_url":"https://api.github.com/users/ancorgs/gists{/gist_id}","starred_url":"https://api.github.com/users/ancorgs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ancorgs/subscriptions","organizations_url":"https://api.github.com/users/ancorgs/orgs","repos_url":"https://api.github.com/users/ancorgs/repos","events_url":"https://api.github.com/users/ancorgs/events{/privacy}","received_events_url":"https://api.github.com/users/ancorgs/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ancorgs/yast-storage","description":"YaST module storage","fork":true,"url":"https://api.github.com/repos/ancorgs/yast-storage","forks_url":"https://api.github.com/repos/ancorgs/yast-storage/forks","keys_url":"https://api.github.com/repos/ancorgs/yast-storage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ancorgs/yast-storage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ancorgs/yast-storage/teams","hooks_url":"https://api.github.com/repos/ancorgs/yast-storage/hooks","issue_events_url":"https://api.github.com/repos/ancorgs/yast-storage/issues/events{/number}","events_url":"https://api.github.com/repos/ancorgs/yast-storage/events","assignees_url":"https://api.github.com/repos/ancorgs/yast-storage/assignees{/user}","branches_url":"https://api.github.com/repos/ancorgs/yast-storage/branches{/branch}","tags_url":"https://api.github.com/repos/ancorgs/yast-storage/tags","blobs_url":"https://api.github.com/repos/ancorgs/yast-storage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ancorgs/yast-storage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ancorgs/yast-storage/git/refs{/sha}","trees_url":"https://api.github.com/repos/ancorgs/yast-storage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ancorgs/yast-storage/statuses/{sha}","languages_url":"https://api.github.com/repos/ancorgs/yast-storage/languages","stargazers_url":"https://api.github.com/repos/ancorgs/yast-storage/stargazers","contributors_url":"https://api.github.com/repos/ancorgs/yast-storage/contributors","subscribers_url":"https://api.github.com/repos/ancorgs/yast-storage/subscribers","subscription_url":"https://api.github.com/repos/ancorgs/yast-storage/subscription","commits_url":"https://api.github.com/repos/ancorgs/yast-storage/commits{/sha}","git_commits_url":"https://api.github.com/repos/ancorgs/yast-storage/git/commits{/sha}","comments_url":"https://api.github.com/repos/ancorgs/yast-storage/comments{/number}","issue_comment_url":"https://api.github.com/repos/ancorgs/yast-storage/issues/comments{/number}","contents_url":"https://api.github.com/repos/ancorgs/yast-storage/contents/{+path}","compare_url":"https://api.github.com/repos/ancorgs/yast-storage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ancorgs/yast-storage/merges","archive_url":"https://api.github.com/repos/ancorgs/yast-storage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ancorgs/yast-storage/downloads","issues_url":"https://api.github.com/repos/ancorgs/yast-storage/issues{/number}","pulls_url":"https://api.github.com/repos/ancorgs/yast-storage/pulls{/number}","milestones_url":"https://api.github.com/repos/ancorgs/yast-storage/milestones{/number}","notifications_url":"https://api.github.com/repos/ancorgs/yast-storage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ancorgs/yast-storage/labels{/name}","releases_url":"https://api.github.com/repos/ancorgs/yast-storage/releases{/id}","deployments_url":"https://api.github.com/repos/ancorgs/yast-storage/deployments","created_at":"2016-02-01T12:57:53Z","updated_at":"2016-02-01T12:57:55Z","pushed_at":"2016-02-17T15:44:13Z","git_url":"git://github.com/ancorgs/yast-storage.git","ssh_url":"git@github.com:ancorgs/yast-storage.git","clone_url":"https://github.com/ancorgs/yast-storage.git","svn_url":"https://github.com/ancorgs/yast-storage","homepage":"http://en.opensuse.org/Portal:YaST","size":76548,"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":"yast:master","ref":"master","sha":"f7cdd10990c1d5531830ecab9e19e5e4b267932f","user":{"login":"yast","id":909990,"avatar_url":"https://avatars.githubusercontent.com/u/909990?v=3","gravatar_id":"","url":"https://api.github.com/users/yast","html_url":"https://github.com/yast","followers_url":"https://api.github.com/users/yast/followers","following_url":"https://api.github.com/users/yast/following{/other_user}","gists_url":"https://api.github.com/users/yast/gists{/gist_id}","starred_url":"https://api.github.com/users/yast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yast/subscriptions","organizations_url":"https://api.github.com/users/yast/orgs","repos_url":"https://api.github.com/users/yast/repos","events_url":"https://api.github.com/users/yast/events{/privacy}","received_events_url":"https://api.github.com/users/yast/received_events","type":"Organization","site_admin":false},"repo":{"id":4368222,"name":"yast-storage","full_name":"yast/yast-storage","owner":{"login":"yast","id":909990,"avatar_url":"https://avatars.githubusercontent.com/u/909990?v=3","gravatar_id":"","url":"https://api.github.com/users/yast","html_url":"https://github.com/yast","followers_url":"https://api.github.com/users/yast/followers","following_url":"https://api.github.com/users/yast/following{/other_user}","gists_url":"https://api.github.com/users/yast/gists{/gist_id}","starred_url":"https://api.github.com/users/yast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yast/subscriptions","organizations_url":"https://api.github.com/users/yast/orgs","repos_url":"https://api.github.com/users/yast/repos","events_url":"https://api.github.com/users/yast/events{/privacy}","received_events_url":"https://api.github.com/users/yast/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yast/yast-storage","description":"YaST module storage","fork":false,"url":"https://api.github.com/repos/yast/yast-storage","forks_url":"https://api.github.com/repos/yast/yast-storage/forks","keys_url":"https://api.github.com/repos/yast/yast-storage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yast/yast-storage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yast/yast-storage/teams","hooks_url":"https://api.github.com/repos/yast/yast-storage/hooks","issue_events_url":"https://api.github.com/repos/yast/yast-storage/issues/events{/number}","events_url":"https://api.github.com/repos/yast/yast-storage/events","assignees_url":"https://api.github.com/repos/yast/yast-storage/assignees{/user}","branches_url":"https://api.github.com/repos/yast/yast-storage/branches{/branch}","tags_url":"https://api.github.com/repos/yast/yast-storage/tags","blobs_url":"https://api.github.com/repos/yast/yast-storage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yast/yast-storage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yast/yast-storage/git/refs{/sha}","trees_url":"https://api.github.com/repos/yast/yast-storage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yast/yast-storage/statuses/{sha}","languages_url":"https://api.github.com/repos/yast/yast-storage/languages","stargazers_url":"https://api.github.com/repos/yast/yast-storage/stargazers","contributors_url":"https://api.github.com/repos/yast/yast-storage/contributors","subscribers_url":"https://api.github.com/repos/yast/yast-storage/subscribers","subscription_url":"https://api.github.com/repos/yast/yast-storage/subscription","commits_url":"https://api.github.com/repos/yast/yast-storage/commits{/sha}","git_commits_url":"https://api.github.com/repos/yast/yast-storage/git/commits{/sha}","comments_url":"https://api.github.com/repos/yast/yast-storage/comments{/number}","issue_comment_url":"https://api.github.com/repos/yast/yast-storage/issues/comments{/number}","contents_url":"https://api.github.com/repos/yast/yast-storage/contents/{+path}","compare_url":"https://api.github.com/repos/yast/yast-storage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yast/yast-storage/merges","archive_url":"https://api.github.com/repos/yast/yast-storage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yast/yast-storage/downloads","issues_url":"https://api.github.com/repos/yast/yast-storage/issues{/number}","pulls_url":"https://api.github.com/repos/yast/yast-storage/pulls{/number}","milestones_url":"https://api.github.com/repos/yast/yast-storage/milestones{/number}","notifications_url":"https://api.github.com/repos/yast/yast-storage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yast/yast-storage/labels{/name}","releases_url":"https://api.github.com/repos/yast/yast-storage/releases{/id}","deployments_url":"https://api.github.com/repos/yast/yast-storage/deployments","created_at":"2012-05-18T10:26:36Z","updated_at":"2016-01-13T15:27:57Z","pushed_at":"2016-02-17T15:44:14Z","git_url":"git://github.com/yast/yast-storage.git","ssh_url":"git@github.com:yast/yast-storage.git","clone_url":"https://github.com/yast/yast-storage.git","svn_url":"https://github.com/yast/yast-storage","homepage":"http://en.opensuse.org/Portal:YaST","size":76644,"stargazers_count":3,"watchers_count":3,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":4,"forks":10,"open_issues":4,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yast/yast-storage/pulls/191"},"html":{"href":"https://github.com/yast/yast-storage/pull/191"},"issue":{"href":"https://api.github.com/repos/yast/yast-storage/issues/191"},"comments":{"href":"https://api.github.com/repos/yast/yast-storage/issues/191/comments"},"review_comments":{"href":"https://api.github.com/repos/yast/yast-storage/pulls/191/comments"},"review_comment":{"href":"https://api.github.com/repos/yast/yast-storage/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yast/yast-storage/pulls/191/commits"},"statuses":{"href":"https://api.github.com/repos/yast/yast-storage/statuses/7323ba4193efa9bc647366f1db164738ad30ad84"}}}}