# Path: meld/vc/_vc.py
# (STATE_IGNORED, STATE_NONE, STATE_NORMAL, STATE_NOCHANGE,
#     STATE_ERROR, STATE_EMPTY, STATE_NEW,
#     STATE_MODIFIED, STATE_RENAMED, STATE_CONFLICT, STATE_REMOVED,
#     STATE_MISSING, STATE_NONEXIST, STATE_SPINNER, STATE_MAX) = list(range(15))
# (CONFLICT_MERGED, CONFLICT_BASE, CONFLICT_LOCAL,
#     CONFLICT_REMOTE, CONFLICT_MAX) = list(range(5))
# CONFLICT_OTHER = CONFLICT_REMOTE
# CONFLICT_THIS = CONFLICT_LOCAL
#     VC_DIR: ClassVar[str]
#     VC_ROOT_WALK: ClassVar[bool] = True
# def partition(pred, iterable):
#     def __init__(self, path, name, state, isdir, options=None):
#     def __str__(self):
#     def __repr__(self):
#     def get_status(self):
#     def is_present(self):
#     def is_modified(entry):
#     def is_normal(entry):
#     def is_nonvc(entry):
#     def is_ignored(entry):
#     def __init__(self, path):
#     def run(self, *args, use_locale_encoding=True):
#     def get_files_to_commit(self, paths):
#     def get_commit_message_prefill(self):
#     def get_commits_to_push_summary(self):
#     def get_valid_actions(self, path_states):
#     def get_path_for_repo_file(self, path, commit=None):
#     def get_path_for_conflict(self, path, conflict):
#     def refresh_vc_state(self, path=None):
#     def get_entries(self, base):
#     def _add_missing_cache_entry(self, path, state):
#     def get_entry(self, path):
#     def is_installed(cls):
#     def is_in_repo(cls, path):
#     def check_repo_root(cls, location):
#     def find_repo_root(cls, location):
#     def valid_repo(cls, path):
#     def __init__(self, vc, path, err):
#     def __str__(self):
#     def __init__(self, vc, rev, err):
#     def __str__(self):
# def popen(cmd, cwd=None, use_locale_encoding=True):
# def call_temp_output(cmd, cwd, file_id='', suffix=None):
# def call(cmd, cwd=None):
# def base_from_diff3(merged):
# class Entry:
# class Vc:
# class InvalidVCPath(ValueError):
# class InvalidVCRevision(ValueError):


import os
from gi.module import get_introspection_module
from gi.repository import Gdk, GLib, GObject, Pango
from meld.style import colour_lookup_with_fallback
from meld.treehelpers import SearchableTreeStore
from meld.vc._vc import (  # noqa: F401
    CONFLICT_BASE,
    CONFLICT_LOCAL,
    CONFLICT_MERGED,
    CONFLICT_OTHER,
    CONFLICT_REMOTE,
    CONFLICT_THIS,
    STATE_CONFLICT,
    STATE_EMPTY,
    STATE_ERROR,
    STATE_IGNORED,
    STATE_MAX,
    STATE_MISSING,
    STATE_MODIFIED,
    STATE_NEW,
    STATE_NOCHANGE,
    STATE_NONE,
    STATE_NONEXIST,
    STATE_NORMAL,
    STATE_REMOVED,
    STATE_SPINNER,
)
        con_fg = lookup("meld:conflict", "foreground")

        self.text_attributes = [
            # foreground, style, weight, strikethrough
            (unk_fg, roman,  normal, None),  # STATE_IGNORED
            (unk_fg, roman,  normal, None),  # STATE_NONE
            (None,   roman,  normal, None),  # STATE_NORMAL
            (None,   italic, normal, None),  # STATE_NOCHANGE
            (err_fg, roman,  bold,   None),  # STATE_ERROR
            (unk_fg, italic, normal, None),  # STATE_EMPTY
            (new_fg, roman,  bold,   None),  # STATE_NEW
            (mod_fg, roman,  bold,   None),  # STATE_MODIFIED
            (mod_fg, roman,  normal, None),  # STATE_RENAMED
            (con_fg, roman,  bold,   None),  # STATE_CONFLICT
            (del_fg, roman,  bold,   True),  # STATE_REMOVED
            (del_fg, roman,  bold,   True),  # STATE_MISSING
            (unk_fg, roman,  normal, True),  # STATE_NONEXIST
            (None,   italic, normal, None),  # STATE_SPINNER
        ]

        self.icon_details = [
            # file-icon, folder-icon, file-tint, folder-tint
            ("text-x-generic", "folder", None,   None),    # IGNORED
            ("text-x-generic", "folder", None,   None),    # NONE
            ("text-x-generic", "folder", None,   None),    # NORMAL
            ("text-x-generic", "folder", None,   None),    # NOCHANGE
            ("dialog-warning", None,     None,   None),    # ERROR
            (None,             None,     None,   None),    # EMPTY
            ("text-x-generic", "folder", new_fg, None),    # NEW
            ("text-x-generic", "folder", mod_fg, None),    # MODIFIED

# Path: meld/vc/_vc.py
# (STATE_IGNORED, STATE_NONE, STATE_NORMAL, STATE_NOCHANGE,
#     STATE_ERROR, STATE_EMPTY, STATE_NEW,
#     STATE_MODIFIED, STATE_RENAMED, STATE_CONFLICT, STATE_REMOVED,
#     STATE_MISSING, STATE_NONEXIST, STATE_SPINNER, STATE_MAX) = list(range(15))
# (CONFLICT_MERGED, CONFLICT_BASE, CONFLICT_LOCAL,
#     CONFLICT_REMOTE, CONFLICT_MAX) = list(range(5))
# CONFLICT_OTHER = CONFLICT_REMOTE
# CONFLICT_THIS = CONFLICT_LOCAL
#     VC_DIR: ClassVar[str]
#     VC_ROOT_WALK: ClassVar[bool] = True
# def partition(pred, iterable):
#     def __init__(self, path, name, state, isdir, options=None):
#     def __str__(self):
#     def __repr__(self):
#     def get_status(self):
#     def is_present(self):
#     def is_modified(entry):
#     def is_normal(entry):
#     def is_nonvc(entry):
#     def is_ignored(entry):
#     def __init__(self, path):
#     def run(self, *args, use_locale_encoding=True):
#     def get_files_to_commit(self, paths):
#     def get_commit_message_prefill(self):
#     def get_commits_to_push_summary(self):
#     def get_valid_actions(self, path_states):
#     def get_path_for_repo_file(self, path, commit=None):
#     def get_path_for_conflict(self, path, conflict):
#     def refresh_vc_state(self, path=None):
#     def get_entries(self, base):
#     def _add_missing_cache_entry(self, path, state):
#     def get_entry(self, path):
#     def is_installed(cls):
#     def is_in_repo(cls, path):
#     def check_repo_root(cls, location):
#     def find_repo_root(cls, location):
#     def valid_repo(cls, path):
#     def __init__(self, vc, path, err):
#     def __str__(self):
#     def __init__(self, vc, rev, err):
#     def __str__(self):
# def popen(cmd, cwd=None, use_locale_encoding=True):
# def call_temp_output(cmd, cwd, file_id='', suffix=None):
# def call(cmd, cwd=None):
# def base_from_diff3(merged):
# class Entry:
# class Vc:
# class InvalidVCPath(ValueError):
# class InvalidVCRevision(ValueError):


# Path: meld/tree.py
import os
from gi.module import get_introspection_module
from gi.repository import Gdk, GLib, GObject, Pango
from meld.style import colour_lookup_with_fallback
from meld.treehelpers import SearchableTreeStore
from meld.vc._vc import (  # noqa: F401
    CONFLICT_BASE,
    CONFLICT_LOCAL,
    CONFLICT_MERGED,
    CONFLICT_OTHER,
    CONFLICT_REMOTE,
    CONFLICT_THIS,
    STATE_CONFLICT,
    STATE_EMPTY,
    STATE_ERROR,
    STATE_IGNORED,
    STATE_MAX,
    STATE_MISSING,
    STATE_MODIFIED,
    STATE_NEW,
    STATE_NOCHANGE,
    STATE_NONE,
    STATE_NONEXIST,
    STATE_NORMAL,
    STATE_REMOVED,
    STATE_SPINNER,
)

        con_fg = lookup("meld:conflict", "foreground")

        self.text_attributes = [
            # foreground, style, weight, strikethrough
            (unk_fg, roman,  normal, None),  # STATE_IGNORED
            (unk_fg, roman,  normal, None),  # STATE_NONE
            (None,   roman,  normal, None),  # STATE_NORMAL
            (None,   italic, normal, None),  # STATE_NOCHANGE
            (err_fg, roman,  bold,   None),  # STATE_ERROR
            (unk_fg, italic, normal, None),  # STATE_EMPTY
            (new_fg, roman,  bold,   None),  # STATE_NEW
            (mod_fg, roman,  bold,   None),  # STATE_MODIFIED
            (mod_fg, roman,  normal, None),  # STATE_RENAMED
            (con_fg, roman,  bold,   None),  # STATE_CONFLICT
            (del_fg, roman,  bold,   True),  # STATE_REMOVED
            (del_fg, roman,  bold,   True),  # STATE_MISSING
            (unk_fg, roman,  normal, True),  # STATE_NONEXIST
            (None,   italic, normal, None),  # STATE_SPINNER
        ]

        self.icon_details = [
            # file-icon, folder-icon, file-tint, folder-tint
            ("text-x-generic", "folder", None,   None),    # IGNORED
            ("text-x-generic", "folder", None,   None),    # NONE
            ("text-x-generic", "folder", None,   None),    # NORMAL
            ("text-x-generic", "folder", None,   None),    # NOCHANGE
            ("dialog-warning", None,     None,   None),    # ERROR
            (None,             None,     None,   None),    # EMPTY
            ("text-x-generic", "folder", new_fg, None),    # NEW
            ("text-x-generic", "folder", mod_fg, None),    # MODIFIED

            ("text-x-generic", "folder", mod_fg, None),    # RENAMED