def _compare_tile_contents(list_both, output):
    #pylint:disable=too-many-locals

    # Define a list of tuples (path1, path2) where the contents differ
    # Each
    rec_num = 0
    difference_pairs = []
    for tile_pair in list_both:
        rec_num += 1
        is_mosaic_vrt = False
        level, tile_class_id1, tile_class_id2, path1, path2 = tile_pair
        output.writelines('RECORD NUMBER %d tile_class_id2=%d level=%s\n'
                          %(rec_num, tile_class_id2, level))
        # For a mosaic tile, the tile entry may not be on the database, so
        # look in mosaic_cache:
        if tile_class_id2 in MOSAIC_CLASS_ID:
            path1 = os.path.join(os.path.dirname(path1), 'mosaic_cache',
                                 os.path.basename(path1))
            # For non-PQA tiles, the benchmark mosaic will be .vrt extension
            if level in ['NBAR', 'ORTHO']:
                path1 = re.match(r'(.+)\.tif$', path1).groups(1)[0] + '.vrt'
                is_mosaic_vrt = True

        # Check the Geotransform, Projection and shape (unless it is a vrt)
        if is_mosaic_vrt:
            data1, data2, msg = (None, None, "")
        else:
            # Skip checking of metadata for a vrt mosaic since we will check
            # with system diff command in _compare_data
            data1, data2, msg = _check_tile_metadata(path1, path2)

        if msg:
            output.writelines(msg)

        # Compare the tile contents
        are_different, msg = _compare_data(level,
                                           tile_class_id1, tile_class_id2,
                                           path1, path2, data1, data2)
        if are_different:
            difference_pairs.extend((path1, path2))
        if msg:
            sys.stdout.writelines(msg)
            output.writelines(msg)

    return difference_pairs
Retrieve current mailbox Replica ID for given message database (server).
dataset/ETHPy150Open GeoscienceAustralia/agdc/src/tilecompare.py/_compare_tile_contents--crossover with--dataset/ETHPy150Open byt3bl33d3r/pth-toolkit/lib/python2.7/site-packages/openchange/mailbox.py/OpenChangeDB.get_message_ReplicaID