

def run(self, edit):
    global current_path, existing_console
    current_path = os.path.dirname(self.view.file_name())
    if existing_console:
        self.view.window().focus_view(existing_console)
        if (self.view.window().active_view().name() == CLI_BUFFER_NAME):
            return
    for v in self.view.window().views():
        if (v.name() == CLI_BUFFER_NAME):
            self.view.window().focus_view(v)
            self.view.window().run_command('close')
    existing_console = self.init_console()

dataset/ETHPy150Open guillermooo/Mercurial/mercurial_cli.py ShowMercurialCli.run/original