Perform the change and add it to the `self.undo_list`

        Note that uninteresting changes (changes to ignored files)
        will not be appended to `self.undo_list`.
19060
def do(self, changes, task_handle=taskhandle.NullTaskHandle()):
        
        try:
            self.current_change = changes
            changes.do(change.create_job_set(task_handle, changes))
        finally:
            self.current_change = None
        if self._is_change_interesting(changes):
            self.undo_list.append(changes)
            self._remove_extra_items()
        del self.redo_list[:]
1153921
function handleCurrentFileChange(e, newFile, newPaneId, oldFile) {
        if (newFile) {
            if (_mrofList.length === 0) {
                _initRecentFilesList();
            }

	        _addToMROFList(newFile, newPaneId);
        }
    }
557457
def _bin_update_items(self, items, replace_at_most_one,
                          replacements, leftovers):
        
        for key, values in items:
            # <values> is not a list or an empty list.
            like_list_not_str = self._quacks_like_a_list_but_not_str(values)
            if not like_list_not_str or (like_list_not_str and not values):
                values = [values]

            for value in values:
                # If the value is [], remove any existing leftovers with
                # key <key> and set the list of values itself to [],
                # which in turn will later delete <key> when [] is
                # passed to omdict.setlist() in
                # omdict._update_updateall().
                if value == []:
                    replacements[key] = []
                    leftovers[:] = [l for l in leftovers if key != l[0]]
                    continue

                # If there are existing items with key <key> that have
                # yet to be marked for replacement, mark that item's
                # value to be replaced by <value> by appending it to
                # <replacements>.  TODO: Refactor for clarity
                if (key in self and
                    (key not in replacements or
                     (key in replacements and
                      replacements[key] == []))):
                    replacements[key] = [value]
                elif (key in self and not replace_at_most_one and
                      len(replacements[key]) < len(self.values(key))):
                    replacements[key].append(value)
                else:
                    if replace_at_most_one:
                        replacements[key] = [value]
                    else:
                        leftovers.append((key, value))
573027
def _insert_defaults(self):
        
        merged = merge_defaults(self.structure, self)
        self.update(merged)
73191
def _reset(self):
        

        self._filename = None
        self._block_map = {}
        self._ast = []
        self._ast.append(None)  # header
        self._ast.append([])    # options list
        self._ast.append([])
503848
@Override
    public void undoableEditHappened(UndoableEditEvent arg0) {
        UndoableEdit edit = arg0.getEdit();
        undoManager.addEdit(edit);
    }
26502
protected function updateFilenames(): void
    {
        $this->files->setFlags(\FilesystemIterator::KEY_AS_FILENAME
            | \FilesystemIterator::CURRENT_AS_FILEINFO
            | \FilesystemIterator::SKIP_DOTS);
        $this->filenames = array_keys(iterator_to_array($this->files));
    }
354659
def add(self, filename, change=None):
        
        try:
            if not self.canAdd(filename):
                raise errors.RevisionError('File is not under client path')

            if change is None:
                self.run(['add', filename])
            else:
                self.run(['add', '-c', str(change.change), filename])

            data = self.run(['fstat', filename])[0]
        except errors.CommandError as err:
            LOGGER.debug(err)
            raise errors.RevisionError('File is not under client path')

        rev = Revision(data, self)

        if isinstance(change, Changelist):
            change.append(rev)

        return rev
144786
def modifyInPlace(self, *, sort=None, purge=False, done=None):
        """"""
        self.data = self.modify(sort=sort, purge=purge, done=done)
85086
def undo(self):
        '''  '''
        if self.canundo():
            undoable = self._undos.pop()
            with self._pausereceiver():
                try:
                    undoable.undo()
                except:
                    self.clear()
                    raise
                else:
                    self._redos.append(undoable)
            self.undocallback()
657770
def _alter_umask(self):
        """"""
        if self.umask is None:
            yield  # nothing to do
        else:
            prev_umask = os.umask(self.umask)
            try:
                yield
            finally:
                os.umask(prev_umask)
331803
def mutation(self, config=None, info=None, save_dir=None):
        
        self.result = None
        self.config = config
        self.restore_dir = self.save_dir
        self.save_dir = save_dir
        self.info = info
304135
def run_on_modifications(paths)
      changed_files, success = Runner.run(Inspector.clean(paths), watchers, options)

      throw :task_has_failed unless success
    end
361086
protected void undo() {

        try {
            boolean recursive = Boolean.parseBoolean(m_modifySubresourcesField.getValue().toString());
            boolean undoMove = m_undoMoveField.getValue().booleanValue();
            CmsObject cms = m_context.getCms();
            Set<CmsUUID> updateResources = new HashSet<CmsUUID>();
            for (CmsResource resource : m_context.getResources()) {
                updateResources.add(resource.getStructureId());
                if (undoMove) {
                    // in case a move is undone, add the former parent folder
                    updateResources.add(cms.readParentFolder(resource.getStructureId()).getStructureId());
                }
                CmsLockActionRecord actionRecord = null;
                try {
                    actionRecord = CmsLockUtil.ensureLock(m_context.getCms(), resource);
                    CmsResourceUndoMode mode = CmsResourceUndoMode.getUndoMode(undoMove, recursive);
                    cms.undoChanges(cms.getSitePath(resource), mode);
                    if (undoMove) {
                        // in case a move is undone, also add the new parent folder
                        updateResources.add(cms.readParentFolder(resource.getStructureId()).getStructureId());
                    }
                } finally {
                    if ((actionRecord != null) && (actionRecord.getChange() == LockChange.locked)) {
                        try {
                            m_context.getCms().unlockResource(cms.readResource(resource.getStructureId()));
                        } catch (CmsLockException e) {
                            LOG.warn(e.getLocalizedMessage(), e);
                        }
                    }

                }

            }
            m_context.finish(updateResources);
        } catch (Exception e) {
            m_context.error(e);
        }

    }
1106556
def _muaprocessnew(self):
        """"""
        foldername = self._foldername("new")
        files = self.filesystem.listdir(foldername)
        for filename in files:
            if filename == "":
                continue
            curfilename = self._foldername(joinpath("new", filename))
            newfilename = joinpath(
                self._cur,
                "%s:2,%s" % (filename, "")
                )
            self.filesystem.rename(curfilename, newfilename)
26880
def change_existence(self, is_hidden):
        # type: (bool) -> None
        '''
        
        '''
        if not self._initialized:
            raise pycdlibexception.PyCdlibInternalError('Directory Record not yet initialized')

        if is_hidden:
            self.file_flags |= (1 << self.FILE_FLAG_EXISTENCE_BIT)
        else:
            self.file_flags &= ~(1 << self.FILE_FLAG_EXISTENCE_BIT)
665487
def changed(self, item):
        
        if self._rejectChanges:
            raise errors.ChangeRejected()
        if self.transaction is not None:
            self.transaction.add(item)
            self.touched.add(item)