Creates a new changeset. Changesets are referenced by a random uuid4
        to prevent collisions between multiple changesets.
329437
def record_changeset(self, custom_changeset_id: uuid.UUID = None) -> uuid.UUID:
        
        if custom_changeset_id is not None:
            if custom_changeset_id in self.journal_data:
                raise ValidationError(
                    "Tried to record with an existing changeset id: %r" % custom_changeset_id
                )
            else:
                changeset_id = custom_changeset_id
        else:
            changeset_id = uuid.uuid4()

        self.journal_data[changeset_id] = {}
        return changeset_id
1151549
public static TransactionEdit createCommitted(long writePointer, Set<ChangeId> changes, long nextWritePointer,
                                                boolean canCommit) {
    return new TransactionEdit(writePointer, 0L, State.COMMITTED, 0L, changes, nextWritePointer, canCommit, null, 
                               null, 0L, 0L, null);
  }
284892
def create_guid(self, collection=None):
        
        guid = str(uuid.uuid4())
        if collection:
            return str.join('/', [collection, guid])
        else:
            return guid
1146520
public static <K, V> SetMultimap<K, V> newConcurrentSetMultimap() {
        return newConcurrentSetMultimap(() -> Collections.synchronizedSet(new HashSet<>()));
    }
392922
public ModelNode fromChangeSet(ResourceAddress resourceAddress, Map<String, Object> changeSet) {

        ModelNode define = new ModelNode();
        define.get(ADDRESS).set(resourceAddress);
        define.get(OP).set(WRITE_ATTRIBUTE_OPERATION);

        ModelNode undefine = new ModelNode();
        undefine.get(ADDRESS).set(resourceAddress);
        undefine.get(OP).set(UNDEFINE_ATTRIBUTE);

        ModelNode operation = new ModelNode();
        operation.get(OP).set(COMPOSITE);
        operation.get(ADDRESS).setEmptyList();

        List<ModelNode> steps = new ArrayList<>();
        for (String key : changeSet.keySet()) {
            Object value = changeSet.get(key);

            ModelNode step;
            if (value.equals(FormItem.VALUE_SEMANTICS.UNDEFINED)) {
                step = undefine.clone();
                step.get(NAME).set(key);
            } else {
                step = define.clone();
                step.get(NAME).set(key);

                // set value, including type conversion
                ModelNode valueNode = step.get(VALUE);
                setValue(valueNode, value);
            }
            steps.add(step);
        }

        operation.get(STEPS).set(steps);
        return operation;
    }
622297
def record(self, custom_changeset_id: uuid.UUID = None) -> uuid.UUID:
        
        return self.journal.record_changeset(custom_changeset_id)
321488
def addReferenceSet(self, referenceSet):
        
        id_ = referenceSet.getId()
        self._referenceSetIdMap[id_] = referenceSet
        self._referenceSetNameMap[referenceSet.getLocalId()] = referenceSet
        self._referenceSetIds.append(id_)
1264464
public static TransactionEdit createCommitting(long writePointer, Set<ChangeId> changes) {
    return new TransactionEdit(writePointer, 0L, State.COMMITTING, 0L, changes, 0L, false, null, null, 0L, 0L, null);
  }
125093
@VisibleForTesting
  public FeatureSet with(FeatureSet newFeatures) {
    return new FeatureSet(union(features, newFeatures.features));
  }
602955
def annotate_from_changeset(self, changeset):
        
        if self.annotate_from_changeset_func:
            return self.annotate_from_changeset_func(changeset)
        else:
            return ''.join((changeset.id, '\n'))
886145
function update(annotationObject, changeSet) {
  const updatedAnnotation = Object.assign({}, annotationObject, changeSet);

  let changeDetected = false;
  Object.keys(updatedAnnotation).forEach((key) => {
    if (updatedAnnotation[key] !== annotationObject[key]) {
      changeDetected = true;
    }
  });

  if (changeDetected) {
    generation += 1;
    updatedAnnotation.generation = generation;
  }

  return updatedAnnotation;
}
1101284
public static DiffSet diffSet(Map<String, Object> introspectionOld, Map<String, Object> introspectionNew) {
        return new DiffSet(introspectionOld, introspectionNew);
    }
881947
@Override
    protected ChangeSet getFilteredChangeSet(ChangeSet changeSet) {
        changeSet = super.getFilteredChangeSet(changeSet);
        if (changeSet != null && !changeSet.isEmpty() && xmlFlatteningEnabled && reindexItemsOnComponentUpdates) {
            List<String> createdFiles = changeSet.getCreatedFiles();
            List<String> updatedFiles = changeSet.getUpdatedFiles();
            List<String> deletedFiles = changeSet.getDeletedFiles();
            List<String> newUpdatedFiles = new ArrayList<>(updatedFiles);

            if (CollectionUtils.isNotEmpty(createdFiles)) {
                for (String path : createdFiles) {
                    if (isComponent(path)) {
                        addItemsThatIncludeComponentToUpdatedFiles(path, createdFiles, newUpdatedFiles, deletedFiles);
                    }
                }
            }

            if (CollectionUtils.isNotEmpty(updatedFiles)) {
                for (String path : updatedFiles) {
                    if (isComponent(path)) {
                        addItemsThatIncludeComponentToUpdatedFiles(path, createdFiles, newUpdatedFiles, deletedFiles);
                    }
                }
            }


            if (CollectionUtils.isNotEmpty(deletedFiles)) {
                for (String path : deletedFiles) {
                    if (isComponent(path)) {
                        addItemsThatIncludeComponentToUpdatedFiles(path, createdFiles, newUpdatedFiles, deletedFiles);
                    }
                }
            }

            return new ChangeSet(createdFiles, newUpdatedFiles, deletedFiles);
        } else {
            return changeSet;
        }
    }
40235
def delete_change_set(awsclient, change_set_name, stack_name):
    
    client = awsclient.get_client('cloudformation')

    response = client.delete_change_set(
        ChangeSetName=change_set_name,
        StackName=stack_name)
378832
def commit_changeset(self, changeset_id: uuid.UUID) -> Dict[bytes, Union[bytes, DeletedEntry]]:
        
        does_clear = self.has_clear(changeset_id)
        changeset_data = self.pop_changeset(changeset_id)
        if not self.is_empty():
            # we only have to assign changeset data into the latest changeset if
            # there is one.
            if does_clear:
                # if there was a clear and more changesets underneath then clear the latest
                # changeset, and replace with a new clear changeset
                self.latest = {}
                self._clears_at.add(self.latest_id)
                self.record_changeset()
                self.latest = changeset_data
            else:
                # otherwise, merge in all the current data
                self.latest = merge(
                    self.latest,
                    changeset_data,
                )
        return changeset_data
631660
@NonNull
    public static Changes newInstance(@NonNull String affectedTable, @Nullable String... affectedTags) {
        checkNotNull(affectedTable, "Please specify affected table");
        return new Changes(singleton(affectedTable), nonNullSet(affectedTags));
    }
643611
@Override
    public ObjectSet createObjectSet(ObjectSet objectSet)
            throws NameConflictException {
        try {
            return objectSetDao.createObjectSet(objectSet);
        } catch (DuplicateKeyException e) {
            throw new NameConflictException("Object set name is already in use", e);
        }
    }