Nothing special happens here. This method recieves a
        destination repo, and a payload of `cart` which will be
        uploaded into the target repo.

        Preparation: To use this method you must pre-process your
        cart: Remotes must be fetched and saved locally. Directories
        must be recursed and replaced with their contents. Items
        should be signed if necessary.

        Warning: this method trusts you to Do The Right Thing (TM),
        ahead of time and check file types before feeding them to it.

        `env` - name of the environment with the cart destination
        `cart` - cart to upload
        `callback` - Optional callback to call if juicer.utils.upload_rpm succeeds

def upload(self, env, cart, callback=None):
        """
        Nothing special happens here. This method recieves a
        destination repo, and a payload of `cart` which will be
        uploaded into the target repo.

        Preparation: To use this method you must pre-process your
        cart: Remotes must be fetched and saved locally. Directories
        must be recursed and replaced with their contents. Items
        should be signed if necessary.

        Warning: this method trusts you to Do The Right Thing (TM),
        ahead of time and check file types before feeding them to it.

        `env` - name of the environment with the cart destination
        `cart` - cart to upload
        `callback` - Optional callback to call if juicer.utils.upload_rpm succeeds
        """
        for repo in cart.repos():
            if not juicer.utils.repo_exists_p(repo, self.connectors[env], env):
                juicer.utils.Log.log_info("repo '%s' doesn't exist in %s environment... skipping!",
                                          (repo, env))
                continue

            repoid = "%s-%s" % (repo, env)

            for item in cart[repo]:
                # if item is remote
                if juicer.utils.is_remote_rpm(item.path):
                    # if item is in our pulp server
                    ours = False
                    for env, con in self.connectors.iteritems():
                        if item.path.startswith('/'.join(con.base_url.split('/')[0:2])):
                            ours = True
                            break
                    if ours:
                        # check to see if it's in the right repo
                        if item.path.startswith(juicer.utils.pulp_repo_path(con, repoid)):
                            juicer.utils.Log.log_info("%s is already in repo %s in %s. Nothing to do." % (item, repo, env))
                            continue
                        else:
                            juicer.utils.Log.log_info("Initiating upload of '%s' into '%s'" % (item.path, repoid))
                            item.sync_to(cart.remotes_storage)
                            rpm_id = juicer.utils.upload_rpm(item.path, repoid, self.connectors[env], callback)

                            filename = os.path.basename(item.path)
                            item.update('%s/%s' % (juicer.utils.pulp_repo_path(con, repoid), filename))

                            juicer.utils.Log.log_debug('%s uploaded with an id of %s' %
                                                       (os.path.basename(item.path), rpm_id))
                    else:
                        juicer.utils.Log.log_info("Initiating upload of '%s' into '%s'" % (item.path, repoid))
                        rpm_id = juicer.utils.upload_rpm(item.path, repoid, self.connectors[env], callback)
                        juicer.utils.Log.log_debug('%s uploaded with an id of %s' %
                                                   (os.path.basename(item.path), rpm_id))
                # else item is local
                elif juicer.utils.is_rpm(item.path):
                    juicer.utils.Log.log_info("Initiating upload of '%s' into '%s'" % (item.path, repoid))
                    rpm_id = juicer.utils.upload_rpm(item.path, repoid, self.connectors[env], callback)
                    juicer.utils.Log.log_debug('%s uploaded with an id of %s' %
                                               (os.path.basename(item.path), rpm_id))

                    # Upload carts aren't special, don't update their paths
                    if cart.cart_name == 'upload-cart':
                        continue
                    # Set the path to items in this cart to their location on
                    # the pulp server.
                    path = juicer.utils.remote_url(self.connectors[env],
                                                   env,
                                                   repo,
                                                   os.path.basename(item.path))
                    item.update(path)

            self.connectors[env].post('/repositories/%s/actions/publish/' % repoid, {'id': 'yum_distributor'})

        # Upload carts don't persist
        if not cart.cart_name == 'upload-cart':
            cart.current_env = env
            cart.save()
            self.publish(cart)
        return True