def projects_database_update_success(self, aliases_after_update,<EOL>projects_db):
def show_aliases(aliases):<EOL><INDENT>"""<STR_LIT>"""<EOL>for alias in aliases:<EOL><INDENT>mapping = aliases_after_update[alias]<EOL>(project, activity) = projects_db.mapping_to_project(mapping)<EOL>self.msg("<STR_LIT>" % (<EOL>alias, project.name if project else "<STR_LIT:?>",<EOL>activity.name if activity else "<STR_LIT:?>"<EOL>))<EOL><DEDENT><DEDENT>self.msg("<STR_LIT>")<EOL>deleted_aliases = (set(aliases_database.aliases.keys()) -<EOL>set(aliases_after_update.keys()))<EOL>added_aliases = (set(aliases_after_update.keys()) -<EOL>set(aliases_database.aliases.keys()))<EOL>modified_aliases = set()<EOL>for alias, mapping in six.iteritems(aliases_after_update):<EOL><INDENT>if (alias in aliases_database<EOL>and aliases_database[alias][:<NUM_LIT:2>] != mapping[:<NUM_LIT:2>]):<EOL><INDENT>modified_aliases.add(alias)<EOL><DEDENT><DEDENT>if added_aliases:<EOL><INDENT>self.msg("<STR_LIT>")<EOL>show_aliases(added_aliases)<EOL><DEDENT>if deleted_aliases:<EOL><INDENT>self.msg("<STR_LIT>")<EOL>for alias in deleted_aliases:<EOL><INDENT>self.msg(alias)<EOL><DEDENT><DEDENT>if modified_aliases:<EOL><INDENT>self.msg("<STR_LIT>")<EOL>show_aliases(modified_aliases)<EOL><DEDENT>
Display the results of the projects/aliases database update. We need
the projects db to extract the name of the projects / activities.