Update spikes when a new revision is created.
184301
function (oldBin, newBin) {

    if (!newBin || !newBin.url) {
      // FIXME this is just patching a problem, the source of which I'm not sure
      console.error('spike/index.js#bump-revision - missing newBin', newBin);
      return;
    }

    var oldSession = utils.sessionForBin(oldBin),
        oldKey = utils.keyForBin(oldBin),
        newSession = utils.sessionForBin(newBin, true),
        newKey = utils.keyForBin(newBin);

    if (!oldSession) { return; }

    // Move connections from one session to another
    oldSession.res.forEach(function (res) {
      // Add the connection to the new session's list
      newSession.res.push(res);
      // Upgrade the connection with the new bin
      res.req.bin = newBin;
      // Tell the client to bump their revision
      res.write(utils.makeEvent('bump-revision', newKey));
      if (res.ajax) {
        // lets older browsers finish their xhr request
        res.end();
        res.req.emit('close');
      }
      return false;
    });

    // There should be no more connections to this bin, so byebye!
    oldSession.res = [];
    delete sessions[oldKey];

  }
590648
public synchronized void flushUpdates() {

        Set<CmsUUID> updateIds = m_updateSet.removeAll();
        if (!updateIds.isEmpty()) {
            if (updateIds.contains(UPDATE_ALL)) {
                initialize();
            } else {
                Map<CmsUUID, CmsContainerConfigurationGroup> groups = loadFromIds(updateIds);
                CmsContainerConfigurationCacheState state = m_state.updateWithChangedGroups(groups);
                m_state = state;
            }
        }
    }
261961
public void postUpdate()
    {
        if (current != null)
        {
            final Class<? extends State> next = current.checkTransitions(last);
            if (next != null)
            {
                changeState(next);
            }
        }
    }
755563
def record_occupation_updates(self, updates, source, version):
        
        now = int(time.time())
        # Put it on the recordQueue and notify the worker thread.
        with self.recordCond:
            self.recordQueue.append((now, updates, source))
            self.recordCond.notify()
480145
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		if (AbstractDataSource.this.options.databaseLifecycleHandler != null) {
			AbstractDataSource.this.options.databaseLifecycleHandler.onUpdate(db, oldVersion, newVersion, true);
			versionChanged = true;
		}
	}
902409
def get_updates(self, *args, **kwargs):
        """"""
        return get_updates(*args, **self._merge_overrides(**kwargs)).run()
1075316
private void runPendingUpdates() {
		IResource[] markerResources= null;
		IResource[] annotationResources= null;
		synchronized (this) {
			if (!fResourcesWithMarkerChanges.isEmpty()) {
				markerResources= (IResource[]) fResourcesWithMarkerChanges.toArray(new IResource[fResourcesWithMarkerChanges.size()]);
				fResourcesWithMarkerChanges.clear();
			}
			if (!fResourcesWithAnnotationChanges.isEmpty()) {
				annotationResources= (IResource[]) fResourcesWithAnnotationChanges.toArray(new IResource[fResourcesWithAnnotationChanges.size()]);
				fResourcesWithAnnotationChanges.clear();
			}
		}
		Object[] listeners= fListeners.getListeners();
		for (int i= 0; i < listeners.length; i++) {
			IProblemChangedListener curr= (IProblemChangedListener) listeners[i];
			if (markerResources != null) {
				curr.problemsChanged(markerResources, true);
			}
			if (annotationResources != null) {
				curr.problemsChanged(annotationResources, false);
			}
		}
	}
1243229
function onUpdateAllCompleted(userComments, callback, polledData) {
    var logDump = createLogDump(
        userComments, Constants,
        EventsTracker.getInstance().getAllCapturedEvents(), polledData,
        getTabData_(), timeutil.getCurrentTime());
    callback(JSON.stringify(logDump));
  }
1259587
private function internalUpdate()
    {
        if ($this->triggerEvent(self::EVENT_NAME_BEFORE_UPDATE)->isCancelled()) {
            return;
        }

        // locking
        $query = array('_id' => $this->getId());
        if ($this->getOption('lock') === Definition::LOCK_OPTIMISTIC) {
            $query['__version__'] = $this->get('__version__');
            $this->getOperator()->increment('__version__');
        }

        // update
        try {
            $status = $this
                ->collection
                ->getMongoCollection()
                ->update(
                    $query,
                    $this->getOperator()->toArray()
                );
        } catch (\Exception $e) {
            throw new WriteException(
                $e->getMessage(),
                $e->getCode(),
                $e
            );
        }

        // check update status
        if ($status['ok'] != 1) {
            throw new WriteException(
                sprintf(
                    'Update error: %s: %s',
                    $status['err'],
                    $status['errmsg']
                )
            );
        }

        // check if document modified due to specified lock
        if ($this->getOption('lock') === Definition::LOCK_OPTIMISTIC) {
            if ($status['n'] === 0) {
                throw new OptimisticLockFailureException;
            }
        }

        if ($this->getOperator()->isReloadRequired()) {
            $this->refresh();
        } else {
            $this->getOperator()->reset();
        }

        $this->triggerEvent(self::EVENT_NAME_AFTER_UPDATE);
    }
1016824
def add_new_revision
            root = @revisions.last.trailer[:Root] unless @revisions.empty?

            @revisions << Revision.new(self)
            @revisions.last.trailer = Trailer.new
            @revisions.last.trailer.Root = root

            self
        end
476376
def OnUpdate(self, event):
        """"""

        if wx.ID_UNDO in self.id2menuitem:
            undo_item = self.id2menuitem[wx.ID_UNDO]
            undo_item.Enable(undo.stack().canundo())

        if wx.ID_REDO in self.id2menuitem:
            redo_item = self.id2menuitem[wx.ID_REDO]
            redo_item.Enable(undo.stack().canredo())

        event.Skip()
726395
def has_new_revision(self):
        
        if self.history.current_revision is None:
            return self.state.revision_id is not None

        current_revision_id = self.history.current_revision.revision_id
        return self.state.revision_id != current_revision_id
685958
private final void setPersNew() {
		status = ObjectState.PERSISTENT_NEW;
		stateFlags = PS_PERSISTENT | PS_TRANSACTIONAL | PS_DIRTY | PS_NEW;
		context.getSession().internalGetCache().notifyDirty(this);
	}
302715
void fireUpdated(Object source) {
		if (updateDisable) {
			return;
		}
		
		if (source == maxSpinner) {
			if (getMax() < getMin()) {
				setMin(getMax());
			}
		}
		if (source == minSpinner) {
			if (getMax() < getMin()) {
				setMax(getMin());
			}
		}
		
		for (int i=0;i<listeners.size();i++) {
			((InputPanelListener) listeners.get(i)).minMaxUpdated(this);
		}
	}
939357
def __list_updates(update_type, update_list):
    
    if len(update_list):
        print("  %s:" % update_type)
        for update_item in update_list:
            print("  -- %(version)s on %(upload_time)s" % update_item)
840002
def listen_for_updates(self):
        """"""
        self.toredis.subscribe(self.group_pubsub, callback=self.callback)
906836
def update(self, resource, id_, updates):
        """"""
        args = self._es_args(resource, refresh=True)
        if self._get_retry_on_conflict():
            args['retry_on_conflict'] = self._get_retry_on_conflict()

        updates.pop('_id', None)
        updates.pop('_type', None)
        self._update_parent_args(resource, args, updates)
        return self.elastic(resource).update(id=id_, body={'doc': updates}, **args)