# Path: meld/vc/_vc.py
# (STATE_IGNORED, STATE_NONE, STATE_NORMAL, STATE_NOCHANGE,
#     STATE_ERROR, STATE_EMPTY, STATE_NEW,
#     STATE_MODIFIED, STATE_CONFLICT, STATE_REMOVED,
#     STATE_MISSING, STATE_NONEXIST, STATE_MAX) = list(range(13))
# (CONFLICT_MERGED, CONFLICT_BASE, CONFLICT_LOCAL,
#     CONFLICT_REMOTE, CONFLICT_MAX) = list(range(5))
# CONFLICT_OTHER = CONFLICT_REMOTE
# CONFLICT_THIS = CONFLICT_LOCAL
# DATA_NAME, DATA_STATE, DATA_REVISION, DATA_OPTIONS = list(range(4))
#     VC_DIR = None
#     VC_ROOT_WALK = True
#     VC_METADATA = None
#     VC_COLUMNS = (DATA_NAME, DATA_STATE)
#     NULL = open(os.devnull, "wb")
# def partition(pred, iterable):
#     def __init__(self, path, name, state):
#     def __str__(self):
#     def __repr__(self):
#     def get_status(self):
#     def __init__(self, path, name, state):
#     def __init__(self, path, name, state, rev="", options=""):
#     def __init__(self, location):
#     def commit_command(self, message):
#     def update_command(self):
#     def add_command(self):
#     def remove_command(self, force=0):
#     def revert_command(self):
#     def resolved_command(self):
#     def get_files_to_commit(self, paths):
#     def get_commit_message_prefill(self):
#     def update(self, runner, files):
#     def push(self, runner):
#     def revert(self, runner, files):
#     def get_commits_to_push_summary(self):
#     def remove(self, runner, files):
#     def resolve(self, runner, files):
#     def get_path_for_repo_file(self, path, commit=None):
#     def get_path_for_conflict(self, path, conflict):
#     def check_repo_root(self, location):
#     def find_repo_root(self, location):
#     def get_working_directory(self, workdir):
#     def cache_inventory(self, topdir):
#     def uncache_inventory(self):
#     def update_file_state(self, path):
#     def valid_repo(self):
#     def listdir(self, path="."):
#     def lookup_files(self, dirs, files, directory=None):
#     def _get_dirsandfiles(self, directory, dirs, files):
#     def get_entry(self, path):
#     def __init__(self, location):
#     def cache_inventory(self, directory):
#     def uncache_inventory(self):
#     def _lookup_tree_cache(self, directory):
#     def _get_tree_cache(self, directory):
#     def __init__(self, vc, path, err):
#     def __str__(self):
#     def __init__(self, vc, rev, err):
#     def __str__(self):
# def popen(cmd, cwd=None):
# def call(cmd, cwd=None):
# class Entry(object):
# class Dir(Entry):
# class File(Entry):
# class Vc(object):
# class CachedVc(Vc):
# class InvalidVCPath(ValueError):
# class InvalidVCRevision(ValueError):


import os
import gobject
import gtk
import pango
from meld.vc._vc import \
    STATE_IGNORED, STATE_NONE, STATE_NORMAL, STATE_NOCHANGE, \
    STATE_ERROR, STATE_EMPTY, STATE_NEW, \
    STATE_MODIFIED, STATE_CONFLICT, STATE_REMOVED, \
    STATE_MISSING, STATE_NONEXIST, STATE_MAX, \
    CONFLICT_BASE, CONFLICT_LOCAL, CONFLICT_REMOTE, \
    CONFLICT_MERGED, CONFLICT_OTHER, CONFLICT_THIS
        icon = self.icon_details[state][1 if isdir else 0]
        tint = self.icon_details[state][3 if isdir else 2]
        self.set_value(it, col_idx(COL_STATE, pane), str(state))
        self.set_value(it, col_idx(COL_TEXT,  pane), label)
        self.set_value(it, col_idx(COL_ICON,  pane), icon)
        self.set_value(it, col_idx(COL_TINT,  pane), tint)

        fg, style, weight, strike = self.text_attributes[state]
        self.set_value(it, col_idx(COL_FG, pane), fg)
        self.set_value(it, col_idx(COL_STYLE, pane), style)
        self.set_value(it, col_idx(COL_WEIGHT, pane), weight)
        self.set_value(it, col_idx(COL_STRIKE, pane), strike)

    def get_state(self, it, pane):
        STATE = self.column_index(COL_STATE, pane)
        try:
            return int(self.get_value(it, STATE))
        except TypeError:
            return None

    def inorder_search_down(self, it):
        while it:
            child = self.iter_children(it)
            if child:
                it = child
            else:
                next = self.iter_next(it)
                if next:
                    it = next
                else:

# Path: meld/vc/_vc.py
# (STATE_IGNORED, STATE_NONE, STATE_NORMAL, STATE_NOCHANGE,
#     STATE_ERROR, STATE_EMPTY, STATE_NEW,
#     STATE_MODIFIED, STATE_CONFLICT, STATE_REMOVED,
#     STATE_MISSING, STATE_NONEXIST, STATE_MAX) = list(range(13))
# (CONFLICT_MERGED, CONFLICT_BASE, CONFLICT_LOCAL,
#     CONFLICT_REMOTE, CONFLICT_MAX) = list(range(5))
# CONFLICT_OTHER = CONFLICT_REMOTE
# CONFLICT_THIS = CONFLICT_LOCAL
# DATA_NAME, DATA_STATE, DATA_REVISION, DATA_OPTIONS = list(range(4))
#     VC_DIR = None
#     VC_ROOT_WALK = True
#     VC_METADATA = None
#     VC_COLUMNS = (DATA_NAME, DATA_STATE)
#     NULL = open(os.devnull, "wb")
# def partition(pred, iterable):
#     def __init__(self, path, name, state):
#     def __str__(self):
#     def __repr__(self):
#     def get_status(self):
#     def __init__(self, path, name, state):
#     def __init__(self, path, name, state, rev="", options=""):
#     def __init__(self, location):
#     def commit_command(self, message):
#     def update_command(self):
#     def add_command(self):
#     def remove_command(self, force=0):
#     def revert_command(self):
#     def resolved_command(self):
#     def get_files_to_commit(self, paths):
#     def get_commit_message_prefill(self):
#     def update(self, runner, files):
#     def push(self, runner):
#     def revert(self, runner, files):
#     def get_commits_to_push_summary(self):
#     def remove(self, runner, files):
#     def resolve(self, runner, files):
#     def get_path_for_repo_file(self, path, commit=None):
#     def get_path_for_conflict(self, path, conflict):
#     def check_repo_root(self, location):
#     def find_repo_root(self, location):
#     def get_working_directory(self, workdir):
#     def cache_inventory(self, topdir):
#     def uncache_inventory(self):
#     def update_file_state(self, path):
#     def valid_repo(self):
#     def listdir(self, path="."):
#     def lookup_files(self, dirs, files, directory=None):
#     def _get_dirsandfiles(self, directory, dirs, files):
#     def get_entry(self, path):
#     def __init__(self, location):
#     def cache_inventory(self, directory):
#     def uncache_inventory(self):
#     def _lookup_tree_cache(self, directory):
#     def _get_tree_cache(self, directory):
#     def __init__(self, vc, path, err):
#     def __str__(self):
#     def __init__(self, vc, rev, err):
#     def __str__(self):
# def popen(cmd, cwd=None):
# def call(cmd, cwd=None):
# class Entry(object):
# class Dir(Entry):
# class File(Entry):
# class Vc(object):
# class CachedVc(Vc):
# class InvalidVCPath(ValueError):
# class InvalidVCRevision(ValueError):


# Path: meld/tree.py
import os
import gobject
import gtk
import pango
from meld.vc._vc import \
    STATE_IGNORED, STATE_NONE, STATE_NORMAL, STATE_NOCHANGE, \
    STATE_ERROR, STATE_EMPTY, STATE_NEW, \
    STATE_MODIFIED, STATE_CONFLICT, STATE_REMOVED, \
    STATE_MISSING, STATE_NONEXIST, STATE_MAX, \
    CONFLICT_BASE, CONFLICT_LOCAL, CONFLICT_REMOTE, \
    CONFLICT_MERGED, CONFLICT_OTHER, CONFLICT_THIS

        icon = self.icon_details[state][1 if isdir else 0]
        tint = self.icon_details[state][3 if isdir else 2]
        self.set_value(it, col_idx(COL_STATE, pane), str(state))
        self.set_value(it, col_idx(COL_TEXT,  pane), label)
        self.set_value(it, col_idx(COL_ICON,  pane), icon)
        self.set_value(it, col_idx(COL_TINT,  pane), tint)

        fg, style, weight, strike = self.text_attributes[state]
        self.set_value(it, col_idx(COL_FG, pane), fg)
        self.set_value(it, col_idx(COL_STYLE, pane), style)
        self.set_value(it, col_idx(COL_WEIGHT, pane), weight)
        self.set_value(it, col_idx(COL_STRIKE, pane), strike)

    def get_state(self, it, pane):
        STATE = self.column_index(COL_STATE, pane)
        try:
            return int(self.get_value(it, STATE))
        except TypeError:
            return None

    def inorder_search_down(self, it):
        while it:
            child = self.iter_children(it)
            if child:
                it = child
            else:
                next = self.iter_next(it)
                if next:
                    it = next
                else:

                    while 1: