def processManagedUpdate(manifestitem, cataloglist, installinfo):
    manifestitemname = os.path.split(manifestitem)[1]
    munkicommon.display_debug1(
        '* Processing manifest item %s for update', manifestitemname)

    # check to see if item is already in the update list:
    if manifestitemname in installinfo['managed_updates']:
        munkicommon.display_debug1(
            '%s has already been processed for update.', manifestitemname)
        return
    # check to see if item is already in the installlist:
    if manifestitemname in installinfo['processed_installs']:
        munkicommon.display_debug1(
            '%s has already been processed for install.', manifestitemname)
        return
    # check to see if item is already in the removallist:
    if manifestitemname in installinfo['processed_uninstalls']:
        munkicommon.display_debug1(
            '%s has already been processed for uninstall.', manifestitemname)
        return

    item_pl = getItemDetail(manifestitem, cataloglist)
    if not item_pl:
        munkicommon.display_warning(
            'Could not process item %s for update. '
            'No pkginfo found in catalogs: %s ',
            manifestitem, ', '.join(cataloglist))
        return

    # we only offer to update if some version of the item is already
    # installed, so let's check
    if someVersionInstalled(item_pl):
        # add to the list of processed managed_updates
        installinfo['managed_updates'].append(manifestitemname)
        dummy_result = processInstall(manifestitem, cataloglist, installinfo,
                                      is_managed_update=True)
    else:
        munkicommon.display_debug1(
            '%s does not appear to be installed, so no managed updates...',
            manifestitemname)
Test the ability to retrieve a diff for a comparison.
dataset/ETHPy150Open munki/munki/code/client/munkilib/updatecheck.py/processManagedUpdate--crossover with--dataset/ETHPy150Open sigmavirus24/github3.py/tests/integration/test_repos_repo.py/TestComparison.test_patch