def merge_vt(self, host, port, db_name, user, new_vt_filepath,
                 old_db_vt_id, is_local=True):
        self.server_logger.info("Request: merge_vt(%s,%s,%s,%s,%s,%s,%s)" % \
                                (host, port, db_name, user, new_vt_filepath,
                                 old_db_vt_id, is_local))
        try:
            tmp_file = None
            if is_local:
                new_locator = ZIPFileLocator(new_vt_filepath)
            else:
                # vt_filepath contains vt file datastream
                # write to tmp file, read into FileLocator
                # TODO: can we just read the file stream directly in?
                (fd, tmp_file) = tempfile.mkstemp(prefix='vt_tmp',
                                              suffix='.vt')
                os.close(fd)
                vt_file = open(tmp_file, "wb")
                vt_file.write(new_vt_filepath.data)
                vt_file.close()
                new_locator = ZIPFileLocator(tmp_file)

            new_bundle = new_locator.load()
            # add thumbnails to cache
            ThumbnailCache.getInstance()._copy_thumbnails(new_bundle.thumbnails)
            new_locator.save(new_bundle)
            old_db_locator = DBLocator(host=host, port=int(port), database=db_name,
                                       obj_id=int(old_db_vt_id), user=db_write_user, passwd=db_write_pass)
            old_db_bundle = old_db_locator.load()
            vistrails.db.services.vistrail.merge(old_db_bundle, new_bundle, 'vistrails')
            old_db_locator.save(old_db_bundle)
            new_locator.save(old_db_bundle)
            if tmp_file is not None:
                os.unlink(tmp_file)
            return (1, 1)
        except xmlrpclib.ProtocolError, err:
            err_msg = ("A protocol error occurred\n"
                       "URL: %s\n"
                       "HTTP/HTTPS headers: %s\n"
                       "Error code: %d\n"
                       "Error message: %s\n") % (err.url, err.headers,
                                                 err.errcode, err.errmsg)
            self.server_logger.error(err_msg)
            return (str(err), 0)
        except Exception, e:
            self.server_logger.error(str(e))
            self.server_logger.error(traceback.format_exc())
            return (str(e), 0)
Remove a deferred d from our waiting list, as the deferred has been
dataset/ETHPy150Open VisTrails/VisTrails/vistrails/gui/application_server.py/RequestHandler.merge_vt--crossover with--dataset/ETHPy150Open twisted/twisted/twisted/internet/defer.py/DeferredQueue._cancelGet