From d80d36d7a13449304a53342954b2c75c88d38c4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=B4=E5=AF=92?= Date: Fri, 16 Jan 2015 17:29:43 +0800 Subject: [PATCH] add more verbose output --- xUnique.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xUnique.py b/xUnique.py index 85ab6bb..5d945e3 100755 --- a/xUnique.py +++ b/xUnique.py @@ -173,6 +173,7 @@ def substitute_old_keys(self): continue # remove incorrect entry that somehow does not exist in project node tree elif not all(self.__result.get(uuid) for uuid in key_list): + self.vprint("Some node(s) are not in generated result, remove this line :",key_list) removed_lines.append(new_line) continue else: @@ -431,6 +432,7 @@ def __unique_group_or_ref(self, parent_hex, group_ref_hex): if self.nodes[current_hex]['isa'] == 'PBXReferenceProxy': self.__unique_container_item_proxy(parent_hex, self.nodes[current_hex]['remoteRef']) else: + self.vprint("Group/FileReference/ReferenceProxy '", group_ref_hex, "' not found, it will be removed.") self.__result.setdefault('to_be_removed', []).append(group_ref_hex) def __unique_build_file(self, parent_hex, build_file_hex): @@ -441,18 +443,21 @@ def __unique_build_file(self, parent_hex, build_file_hex): else: file_ref_hex = current_node.get('fileRef') if not file_ref_hex: + self.vprint("PBXFileReference '", file_ref_hex, "' not found, it will be removed.") self.__result.setdefault('to_be_removed', []).append(build_file_hex) else: if self.__result.get(file_ref_hex): cur_path_key = self.__result[file_ref_hex]['path'] self.__set_to_result(parent_hex, build_file_hex, cur_path_key) else: + self.vprint("PBXFileReference '", file_ref_hex, "' not found, it will be removed with its PBXBuildFile :", build_file_hex,sep='') self.__result.setdefault('to_be_removed', []).extend((build_file_hex, file_ref_hex)) def __unique_build_rules(self, parent_hex, build_rule_hex): '''PBXBuildRule''' current_node = self.nodes.get(build_rule_hex) if not current_node: + self.vprint("PBXBuildRule '", current_node, "' not found, it will be removed.") self.__result.setdefault('to_be_removed', []).append(build_rule_hex) else: file_type = current_node['fileType']