Esempio n. 1
0
def _get_file_pairs(first_app, second_app):
    """
    :param first_app:
    :param second_app:
    :return: A dictionary mapping file name to tuple where the first element is
     the corresponding file on the first app and the second is the corresponding
     file on the second app.
     "files" will be empty strings if the file does not exist on the app.
    """
    first_app_files = dict(source_files(first_app))
    second_app_files = dict(source_files(second_app))
    file_names = set(first_app_files.keys()) | set(second_app_files.keys())
    file_pairs = {n: (first_app_files.get(n, ""), second_app_files.get(n, "")) for n in file_names}
    return file_pairs
Esempio n. 2
0
def _get_file_pairs(first_app, second_app):
    """
    :param first_app:
    :param second_app:
    :return: A dictionary mapping file name to tuple where the first element is
     the corresponding file on the first app and the second is the corresponding
     file on the second app.
     "files" will be empty strings if the file does not exist on the app.
    """
    first_app_files = dict(source_files(first_app))
    second_app_files = dict(source_files(second_app))
    file_names = set(first_app_files.keys()) | set(second_app_files.keys())
    file_pairs = {
        n: (first_app_files.get(n, ""), second_app_files.get(n, ""))
        for n in file_names
    }
    return file_pairs