Apply the newly entered outcome name it is was changed

        :param str path: The path string of the renderer
        :param str new_name: Newly entered outcome name
339382
def apply_new_outcome_name(self, path, new_name):
        
        # Don't do anything if outcome name didn't change
        if new_name == self.list_store[path][self.NAME_STORAGE_ID]:
            return

        outcome = self.list_store[path][self.CORE_STORAGE_ID]
        try:
            outcome.name = new_name
            logger.debug("Outcome name changed to '{0}'".format(outcome.name))
        except (ValueError, TypeError) as e:
            logger.warning("The name of the outcome could not be changed: {0}".format(e))
        self.list_store[path][self.NAME_STORAGE_ID] = outcome.name
404221
final boolean applyNewNode(Parser<?> parser, String name) {
    int physical = at;
    int logical = step;
    TreeNode latestChild = trace.getLatestChild();
    trace.push(name);
    if (parser.apply(this)) {
      trace.setCurrentResult(result);
      trace.pop();
      return true;
    }
    if (stillThere(physical, logical)) expected(name);
    trace.pop();
    // On failure, the erroneous path shouldn't be counted in the parse tree.
    trace.setLatestChild(latestChild);
    return false;
  }
1318272
def rename_window(self, new_name):
        

        import shlex

        lex = shlex.shlex(new_name)
        lex.escape = ' '
        lex.whitespace_split = False

        try:
            self.cmd('rename-window', new_name)
            self['window_name'] = new_name
        except Exception as e:
            logger.error(e)

        self.server._update_windows()

        return self
862876
def classdot2class(path):
    
    if path[0] == 'L' and path[-1] == ';':
        log.debug("WARNING: %s already a Lclass; name" % path)
        return path

    new_name = 'L' + path.replace('.', '/') + ';'
    return new_name
777394
def rename(path):
    """"""

    new_path = prompt(path)

    if path != new_path:
        try:
            from shutil import move
        except ImportError:
            from os import rename as move

        move(path, new_path)

    return new_path
963164
def rename(name, new_name):
    '''
    
    '''
    current_info = info(name)
    if not current_info:
        raise CommandExecutionError('User \'{0}\' does not exist'.format(name))
    new_info = info(new_name)
    if new_info:
        raise CommandExecutionError(
            'User \'{0}\' already exists'.format(new_name)
        )
    cmd = ['usermod', '-l', new_name, name]
    __salt__['cmd.run'](cmd, python_shell=False)
    return info(new_name).get('name') == new_name
1167082
def action_rename(self, courseid, taskid, path, new_path):
        
        # normalize
        path = path.strip()
        new_path = new_path.strip()
        if not path.startswith("/"):
            path = "/" + path
        if not new_path.startswith("/"):
            new_path = "/" + new_path

        old_path = self.verify_path(courseid, taskid, path)
        if old_path is None:
            return self.show_tab_file(courseid, taskid, _("Internal error"))

        wanted_path = self.verify_path(courseid, taskid, new_path, True)
        if wanted_path is None:
            return self.show_tab_file(courseid, taskid, _("Invalid new path"))

        try:
            self.task_factory.get_task_fs(courseid, taskid).move(old_path, wanted_path)
            return self.show_tab_file(courseid, taskid)
        except:
            return self.show_tab_file(courseid, taskid, _("An error occurred while moving the files"))
139474
def rename(name, new_name):
    '''
    
    '''
    current_info = info(name)
    if not current_info:
        raise CommandExecutionError('User \'{0}\' does not exist'.format(name))
    new_info = info(new_name)
    if new_info:
        raise CommandExecutionError(
            'User \'{0}\' already exists'.format(new_name)
        )
    cmd = ['pw', 'usermod', '-l', new_name, '-n', name]
    __salt__['cmd.run'](cmd)
    post_info = info(new_name)
    if post_info['name'] != current_info['name']:
        return post_info['name'] == new_name
    return False
1292256
def rename(self, new_name):
    
    update = copy.copy(self)
    update.name = new_name
    return self._do_update(update)
683087
def _on_library_path_changed(self, renderer, path, new_library_path):
        
        library_name = self.library_list_store[int(path)][self.KEY_STORAGE_ID]

        library_config = self.core_config_model.get_current_config_value("LIBRARY_PATHS", use_preliminary=True,
                                                                         default={})
        library_config[library_name] = new_library_path
        self.core_config_model.set_preliminary_config_value("LIBRARY_PATHS", library_config)
        self._select_row_by_column_value(self.view['library_tree_view'], self.library_list_store,
                                         self.KEY_STORAGE_ID, library_name)
206135
def rename_with_prefix(self, prefix="", new_path=None, in_place=True, remove_desc=True):
        """"""
        # Temporary path #
        if new_path is None: prefixed = self.__class__(new_temp_path())
        else:                prefixed = self.__class__(new_path)
        # Generator #
        def prefixed_iterator():
            for i,read in enumerate(self):
                read.id = prefix + read.id
                if remove_desc: read.description = ""
                yield read
        # Do it #
        prefixed.write(prefixed_iterator())
        prefixed.close()
        # Replace it #
        if in_place:
            os.remove(self.path)
            shutil.move(prefixed, self.path)
        return prefixed
425805
def update(self, name):
        

        if name is None:
            return

        if name not in self._names:
            # add the name if it isn't already tracked
            self._names[name] = len(self._names)

        result = self._names[name] - self._current
        self._current = self._names[name]
        return result
956375
def replace(self, name, newname):
        
        if not re.match("[a-zA-Z]\w*", name):
            return None
        if not re.match("[a-zA-Z]\w*", newname):
            return None

        def _replace(match):
            return match.group(0).replace(match.group('name'), newname)

        pattern = re.compile("(\W|^)(?P<name>" + name + ")(\W|$)")
        cut = re.sub(pattern, _replace, str(self))
        return Cut(cut)
263565
def rename(self, name, **kwargs):
        

        return self._rename(self._dxid, {"project": self._proj,
                                         "name": name}, **kwargs)
1055679
def create_spawnve(original_name):
    

    def new_spawnve(mode, path, args, env):
        import os
        send_process_created_message()
        return getattr(os, original_name)(mode, path, patch_args(args), env)

    return new_spawnve
298097
public void rename(String newName) throws Failure, FormException {
        if(name.equals(newName))    return; // noop
        Jenkins.checkGoodName(newName);
        if(owner.getView(newName)!=null)
            throw new FormException(Messages.Hudson_ViewAlreadyExists(newName),"name");
        String oldName = name;
        name = newName;
        owner.onViewRenamed(this,oldName,newName);
    }
757981
def rename_file(self, old_path, new_path):
        
        self.log.debug("S3contents.GenericManager: Init rename of '%s' to '%s'", old_path, new_path)
        if self.file_exists(new_path) or self.dir_exists(new_path):
            self.already_exists(new_path)
        elif self.file_exists(old_path) or self.dir_exists(old_path):
            self.log.debug("S3contents.GenericManager: Actually renaming '%s' to '%s'", old_path,
                           new_path)
            self.fs.mv(old_path, new_path)
        else:
            self.no_such_entity(old_path)