<commit_before>import os

import sublime
from sublime_plugin import WindowCommand, TextCommand

from ...common import ui
from ..git_command import GitCommand
from ...common import util


class GsShowRebaseCommand(WindowCommand, GitCommand):

    """
    Open a status view for the active git repository.
    """

    def run(self):
        RebaseInterface(repo_path=self.repo_path)


class RebaseInterface(ui.Interface, GitCommand):

    """
    Status dashboard.
    """

    interface_type = "rebase"
    read_only = True
    syntax_file = "Packages/GitSavvy/syntax/rebase.tmLanguage"
    word_wrap = False

    CARET = "▸"
    SUCCESS = "✔"
    CONFLICT = "✕"
    UNKNOWN = "·"

    template = """\

      REBASE:  {active_branch} --> {base_ref} ({base_commit})
      STATUS:  {status}

        ┳ ({base_commit})
        ┃
    {diverged_commits}
        ┃
        ┻

      ###############                      #############
      ## CONFLICTS ##                      ## COMMITS ##
      ###############                      #############

      [o] open file                        [s] squash commit with next
      [a] accept file in current state     [S] squash all commits
      [m] use mine                         [u] move commit up (before previous)
      [t] use theirs                       [d] move commit down (after next)
      [M] launch external merge tool       [e] edit commit message

      ####################
      ## REBASE ACTIONS ##
      ####################

      [R] restart rebase
      [A] abort rebase
      [F] finalize rebase

    -
    """

    separator = "\n    ┃\n"
    commit = "  {caret} {status}  {commit_hash}  {commit_summary}{conflicts}"
    conflict = "    ┃           conflict: {path}"

    _base_commit_ref = None
    _base_commit = None

    def title(self):
        return "REBASE: {}".format(os.path.basename(self.repo_path))

    def base_ref(self):
        base_ref = self.view.settings().get("git_savvy.rebase.base_ref")
        if not base_ref:
            base_ref = "master"
            self.view.settings().set("git_savvy.revase.base_ref", "master")
        return base_ref

    def base_commit(self):<commit_msg>Update key-bindings for new functionality.<commit_after>import os

import sublime
from sublime_plugin import WindowCommand, TextCommand

from ...common import ui
from ..git_command import GitCommand
from ...common import util


class GsShowRebaseCommand(WindowCommand, GitCommand):

    """
    Open a status view for the active git repository.
    """

    def run(self):
        RebaseInterface(repo_path=self.repo_path)


class RebaseInterface(ui.Interface, GitCommand):

    """
    Status dashboard.
    """

    interface_type = "rebase"
    read_only = True
    syntax_file = "Packages/GitSavvy/syntax/rebase.tmLanguage"
    word_wrap = False

    CARET = "▸"
    SUCCESS = "✔"
    CONFLICT = "✕"
    UNKNOWN = "·"

    template = """\

      REBASE:  {active_branch} --> {base_ref} ({base_commit})
      STATUS:  {status}

        ┳ ({base_commit})
        ┃
    {diverged_commits}
        ┃
        ┻

      ########################                  ############
      ## MANIPULATE COMMITS ##                  ## REBASE ##
      ########################                  ############

      [s] squash commit with next               [d] define base ref for dashboard
      [S] squash all commits                    [A] abort rebase
      [e] edit commit message                   [r] rebase onto...
      [d] move commit down (after next)         [C] continue rebase
      [u] move commit up (before previous)      []

      ###############
      ## CONFLICTS ##
      ###############

      [o] open file
      [g] stage file in current state
      [m] use mine
      [t] use theirs
      [M] launch external merge tool

    -
    """

    separator = "\n    ┃\n"
    commit = "  {caret} {status}  {commit_hash}  {commit_summary}{conflicts}"
    conflict = "    ┃           conflict: {path}"

    _base_commit_ref = None
    _base_commit = None

    def title(self):
        return "REBASE: {}".format(os.path.basename(self.repo_path))

    def base_ref(self):
        base_ref = self.view.settings().get("git_savvy.rebase.base_ref")
        if not base_ref:
            base_ref = "master"
            self.view.settings().set("git_savvy.revase.base_ref", "master")
        return base_ref

    def base_commit(self):
{'fraction_non_alphanumeric': 0.14980677426687883, 'fraction_numerical': 0.0, 'mean_word_length': 2.0344827586206895, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4763735', 'n_tokens_mistral': 1386, 'n_tokens_neox': 1300, 'n_words': 337}