Redo the latest undone command.
506006
def redo(self):
        
        self.undo_manager.redo()
        self.notify_observers()
        logging.debug('undo_manager redo stack={}'.format(self.undo_manager._redo_stack))
688057
def get_corrected_commands(self, command):
        
        new_commands = self.get_new_command(command)
        if not isinstance(new_commands, list):
            new_commands = (new_commands,)
        for n, new_command in enumerate(new_commands):
            yield CorrectedCommand(script=new_command,
                                   side_effect=self.side_effect,
                                   priority=(n + 1) * self.priority)
1206811
def remake(self, *args):
        
        if not self.config:
            return
        if not all((self.key, self.gett, self.sett, self.listen, self.unlisten)):
            Clock.schedule_once(self.remake, 0)
            return
        if not hasattr(self, 'label'):
            self.label = Label(text=str(self.key))

            def updlabel(*args):
                self.label.text = str(self.key)
            self.bind(key=updlabel)
            self.add_widget(self.label)
        if hasattr(self, 'wid'):
            self.remove_widget(self.wid)
            del self.wid
        control = self.config['control']
        widkwargs = {
            'key': self.key,
            'gett': self.gett,
            'sett': self.sett,
            'listen': self.listen,
            'unlisten': self.unlisten
        }
        if control == 'slider':
            cls = StatRowSlider
            try:
               widkwargs['value'] = float(self.gett(self.key))
               widkwargs['min'] = float(self.config['min'])
               widkwargs['max'] = float(self.config['max'])
            except (KeyError, ValueError):
                return
        elif control == 'togglebutton':
            cls = StatRowToggleButton
            try:
                widkwargs['true_text'] = self.config['true_text']
                widkwargs['false_text'] = self.config['false_text']
            except KeyError:
                return
        elif control == 'textinput':
            cls = StatRowTextInput
        else:
            cls = StatRowLabel
        self.wid = cls(**widkwargs)
        self.bind(
            key=self.wid.setter('key'),
            gett=self.wid.setter('gett'),
            sett=self.wid.setter('sett'),
            listen=self.wid.setter('listen'),
            unlisten=self.wid.setter('unlisten')
        )
        if control == 'slider':
            self.unbind(config=self._toggle_update_config)
            self.bind(config=self._slider_update_config)
        elif control == 'togglebutton':
            self.unbind(config=self._slider_update_config)
            self.bind(config=self._toggle_update_config)
        else:
            self.unbind(config=self._slider_update_config)
            self.unbind(config=self._toggle_update_config)
        self.add_widget(self.wid)
1207472
def undo(ui, repo, clname, **opts):
	
	if repo[None].branch() != "default":
		raise hg_util.Abort("cannot run hg undo outside default branch")
	err = clpatch_or_undo(ui, repo, clname, opts, mode="undo")
	if err:
		raise hg_util.Abort(err)
174967
def undo(self):
        
        controllers = self.back()
        if controllers is None:
            ups = ()
        else:
            ups = tuple([controller.undo()
                        for controller in controllers])
        if self.process_ups is not None:
            return self.process_ups(ups)
        else:
            return ups
293826
def reload_me(*args, ignore_patterns=[]):
    """"""
    
    command = [sys.executable, sys.argv[0]]
    command.extend(args)

    reload(*command, ignore_patterns=ignore_patterns)
1044352
def redo(self):
        
        if self._undoing or self._redoing:
            raise RuntimeError
        if not self._redo:
            return
        group = self._redo.pop()

        self._redoing = True

        self.begin_grouping()
        group.perform()
        self.set_action_name(group.name)
        self.end_grouping()

        self._redoing = False

        self.notify()
1032171
def undo_last_change(self):
        
        if len(self.history) == 0:
            raise IndexError("Can't undo. Already at oldest change.")
        if 'input_structure' not in self.history[-1]:
            raise IndexError("Can't undo. Latest history has no "
                             "input_structure")
        h = self.history.pop()
        self._undone.append((h, self.final_structure))
        s = h["input_structure"]
        if isinstance(s, dict):
            s = Structure.from_dict(s)
        self.final_structure = s
612943
def commit(self):
        

        tc = self.qteWidget.textCursor()

        # If this is the first ever call to this undo/redo element then
        # backup the current cursor position and the selected text (may be
        # none). This information will be required for the redo operation
        # to position the cursor (and selected text) where it was at the
        # very first call.
        if self.cursorPos0 is None:
            self.cursorPos0 = tc.position()
            self.selText = tc.selection().toHtml()
            self.selStart = tc.selectionStart()
            self.selEnd = tc.selectionEnd()
        else:
            tc.setPosition(self.cursorPos0, QtGui.QTextCursor.MoveAnchor)

        # Remove the originally selected text (may be none).
        tc.setPosition(self.selStart, QtGui.QTextCursor.MoveAnchor)
        tc.setPosition(self.selEnd, QtGui.QTextCursor.KeepAnchor)
        tc.removeSelectedText()

        # Move to the start of the (just deleted) text block and insert
        # the characters there.
        if len(self.selText) > 0:
            pos = self.selStart
        else:
            pos = tc.position()
        tc.setPosition(pos)

        # Backup the cursor position before the insertion operation,
        # insert the new character(s), move the cursor forward, and
        # backup the new cursor position as well.
        self.cursorPos1 = tc.position()
        tc.insertText(self.text)
        self.cursorPos2 = tc.position()

        self.qteWidget.setTextCursor(tc)
923534
def reset
      output.each do |file, format|
        if File.exist?(file)
          utime(0,0,file)
          report "Marked #{file} as out-of-date."
        end
      end
    end
196725
def undo(scm, verbose, fake, hard):
    """"""
    scm.fake = fake
    scm.verbose = fake or verbose

    scm.repo_check()

    status_log(scm.undo, 'Last commit removed from history.', hard)
1063917
def OnUpdate(self, event):
        """"""

        # Gray out undo and redo id not available

        undo_toolid = self.label2id["Undo"]
        redo_toolid = self.label2id["Redo"]

        self.EnableTool(undo_toolid, undo.stack().canundo())
        self.EnableTool(redo_toolid, undo.stack().canredo())

        # Set ToolTip strings to potential next undo / redo action
        undotext = undo.stack().undotext()
        undo_tool = self.FindTool(undo_toolid)
        if undotext is None:
            undo_tool.SetShortHelp(_("No undo actions available"))
        else:
            undo_tool.SetShortHelp(undotext)

        redotext = undo.stack().redotext()
        redo_tool = self.FindTool(redo_toolid)
        if redotext is None:
            redo_tool.SetShortHelp(_("No redo actions available"))
        else:
            redo_tool.SetShortHelp(redotext)

        self.Refresh()

        event.Skip()
1123745
def shuffle(self):
        """"""
        info = self._get_command_info(CommandInfo_pb2.ChangeShuffleMode)
        return None if info is None else info.shuffleMode
1053696
function fixupCommand(options, callback) {
  if (!options.pmBaseDir) {
    if (fs.existsSync(path.resolve(options.cwd, '.strong-pm'))) {
      options.pmBaseDir = '.strong-pm';
    } else {
      options.pmBaseDir = '.';
    }
  }
  options.pmBaseDir = path.resolve(options.cwd, options.pmBaseDir);

  options.execpath = process.execPath;
  options.script = [
    require.resolve('../bin/sl-pm'),
    '--listen', options.pmPort,
    '--base', options.pmBaseDir,
    '--base-port', options.basePort,
    '--driver', options.driver,
  ].join(' ');

  return writeSeedEnvironment(options, callback);
}
511058
def undo(self):
        
        args = self._undo_stack.back()
        if args is None:
            return
        self._data = deepcopy(self._data_base)
        for clusters, field, value, up, undo_state in self._undo_stack:
            if clusters is not None:
                self.set(field, clusters, value, add_to_stack=False)

        # Return the UpdateInfo instance of the undo action.
        up, undo_state = args[-2:]
        up.history = 'undo'
        up.undo_state = undo_state

        self.emit('cluster', up)
        return up
479370
function undo(nodes) {
  nodes.forEach(function (node) {
    var parent = node.parentNode
    unwrap(node)
    parent.normalize()
  })
}
911214
def strip_command(self, command_string, output):
        """"""
        output_list = output.split(command_string)
        return self.RESPONSE_RETURN.join(output_list)