Set all revisions found to in process, so that other threads will not pick them up.

        :param list ids:
435198
def set_all_revisions_to_in_process(self, ids):
        

        predicate = {
            "_id" : {
                "$in" : [ ObjectId(id) for id in ids ]
            }
        }

        set = {"$set": { "inProcess": True }}

        yield self.revisions.collection.update(predicate, set, multi=True)
279342
def list_revisions(path)
      resp = request('/files/list_revisions', path: path)
      entries = resp['entries'].map { |e| FileMetadata.new(e) }
      return entries, resp['is_deleted']
    end
743733
def create_revision
      return unless self.revision_data
      
      # creating revision
      if ComfyPress.config.revisions_limit.to_i != 0
        self.revisions.create!(:data => self.revision_data)
      end
      
      # blowing away old revisions
      ids = [0] + self.revisions.limit(ComfyPress.config.revisions_limit.to_i).collect(&:id)
      self.revisions.where('id NOT IN (?)', ids).destroy_all
    end
51913
def checkout(self, revision_id):
        
        index = 0
        found = False
        for revision in self.revisions:
            if revision.revision_id == revision_id:
                self.current_index = index
                found = True

            index += 1

        if not found:
            raise RuntimeError("")
634485
public static void removeFromList(List<String> list, String value) {
        int foundIndex = -1;
        int i = 0;
        for (String id : list) {
            if (id.equalsIgnoreCase(value)) {
                foundIndex = i;
                break;
            }
            i++;
        }
        if (foundIndex != -1) {
            list.remove(foundIndex);
        }
    }
895855
public void finish(List<CmsUUID> ids) {

        if (m_selectedRunnable == null) {
            m_dialogContext.finish(ids);
            if (ids.size() == 1) {
                m_dialogContext.focus(ids.get(0));

            }
        } else {
            m_selectedRunnable.run();
        }
    }
1272930
def delete_by_ids(self, ids):
        
        ids = utils.coerce_to_list(ids)
        uri = "/%s?ids=%s" % (self.uri_base, ",".join(ids))
        return self.api.method_delete(uri)
943639
def update_id_list(self, update_ids_finished_cb):
        """"""
        if not self._update_ids_finished_cb:
            self._update_ids_finished_cb = update_ids_finished_cb
            self.anchor_ids = []
            self.active_anchor_ids = []
            self.anchor_data = {}

            self.nr_of_anchors = 0
            self.ids_valid = False
            self.data_valid = False

            logger.debug('Updating ids of memory {}'.format(self.id))

            # Start reading the header
            self.mem_handler.read(self, LocoMemory2.ADR_ID_LIST,
                                  LocoMemory2.ID_LIST_LEN)
455781
@Override
    synchronized public final void set(List<Map<Integer, Integer>> list) {
        this.clear();
        mappings.addAll(list);
    }
898431
public void setDBIDs(DBIDs ids) {
    this.idrep.setDBIDs(ids);
    // Update relations.
    for (Relation<?> orel : this.relations) {
      if (orel instanceof ProxyView) {
        ((ProxyView<?>) orel).setDBIDs(this.idrep.getDBIDs());
      }
    }
  }
818973
def query_revisions_by_revids(session, revids, **params):
    
    doc = session.get(action='query', prop='revisions',
                      revids=revids, **params)

    for page_doc in doc['query'].get('pages', {}).values():
        revisions = page_doc.get('revisions', [])
        if 'revisions' in page_doc:
            del page_doc['revisions']

        for revision_doc in revisions:
            revision_doc['page'] = page_doc
            yield revision_doc
424206
private synchronized void resetAllIndexes() {
    Collection<RaftSessionState> sessions = Lists.newArrayList(this.sessions.values());

    // If no sessions are open, skip the keep-alive.
    if (sessions.isEmpty()) {
      return;
    }

    // Allocate session IDs, command response sequence numbers, and event index arrays.
    long[] sessionIds = new long[sessions.size()];
    long[] commandResponses = new long[sessions.size()];
    long[] eventIndexes = new long[sessions.size()];

    // For each session that needs to be kept alive, populate batch request arrays.
    int i = 0;
    for (RaftSessionState sessionState : sessions) {
      sessionIds[i] = sessionState.getSessionId().id();
      commandResponses[i] = sessionState.getCommandResponse();
      eventIndexes[i] = sessionState.getEventIndex();
      i++;
    }

    log.trace("Resetting {} sessions", sessionIds.length);

    KeepAliveRequest request = KeepAliveRequest.builder()
        .withSessionIds(sessionIds)
        .withCommandSequences(commandResponses)
        .withEventIndexes(eventIndexes)
        .build();
    connection.keepAlive(request);
  }
400741
def list_update(self, id, title):
        
        id = self.__unpack_id(id)
        params = self.__generate_params(locals(), ['id'])
        return self.__api_request('PUT', '/api/v1/lists/{0}'.format(id), params)
327291
def marvcli_comment_rm(ids):
    
    app = create_app()
    db.session.query(Comment)\
              .filter(Comment.id.in_(ids))\
              .delete(synchronize_session=False)
    db.session.commit()
1239410
def delete_by_ids(self, ids):
        
        try:
            self.filter(id__in=ids).delete()
            return True
        except self.model.DoesNotExist:
            return False
81457
def intersection_update(self, *iterables):
        
        _set = self._set
        _list = self._list
        _set.intersection_update(*iterables)
        _list.clear()
        _list.update(_set)
        return self
681381
def setDefaultThread(self, thread_id, thread_type):
        
        self._default_thread_id = thread_id
        self._default_thread_type = thread_type