Esempio n. 1
0
def plugin_loaded():
    if need_package_control_upgrade:
        sublime.error_message(
            u"SVN\n\nThe SVN package seems to have been "
            + u"installed using an older version of Package Control. Please "
            + u"remove the SVN package, upgrade Package Control to 2.0.0 "
            + u"and then reinstall SVN.\n\nIt may be necessary to delete "
            + u'the "Packages/Package Control/" folder and then follow the '
            + u"instructions at https://sublime.wbond.net/installation to "
            + u"properly upgrade Package Control."
        )
        return

    init_config()
    settings = sublime.load_settings("SVN.sublime-settings")
    svn_debug.set_debug(settings.get("debug", False))
    svn_debug.set_debug_log_file(settings.get("debug_log_file", None))

    def reset_shown():
        SVN.shown_missing = {}

    settings.add_on_change("svn_binary_path", reset_shown)
    settings.add_on_change("auto_update_check_frequency", StatusCache.set_check_updates)
    StatusCache.set_check_updates()

    settings_dict["svn_binary_path"] = settings.get("svn_binary_path")

    SvnInit().start()

    bin_folder = os.path.join(os.path.dirname(os.path.abspath(__file__)), "bin")
    has_bin = os.path.exists(bin_folder)
    svn_exe = os.path.join(bin_folder, "1.8", "svn.exe")
    has_svn = os.path.exists(svn_exe)
    if os.name == "nt" and (not has_bin or not has_svn):
        sublime.error_message(
            u"SVN\n\nThe SVN package seems to have been "
            + u"synced or copied from an OS X or Linux machine. The Windows "
            + u"version of the package is different due to the inclusion of "
            + u"a number of necessary exe files.\n\nTo fix the SVN package "
            + u'so that it may run properly, please run "Remove Package" and '
            + u'then reinstall it using the "Install Package" command.\n\nTo '
            + u"learn how to properly sync packages across different machines, "
            + u"please visit https://sublime.wbond.net/docs/syncing"
        )
Esempio n. 2
0
def plugin_loaded():
    if need_package_control_upgrade:
        sublime.error_message(u'SVN\n\nThe SVN package seems to have been ' + \
            u'installed using an older version of Package Control. Please ' + \
            u'remove the SVN package, upgrade Package Control to 2.0.0 ' + \
            u'and then reinstall SVN.\n\nIt may be necessary to delete ' + \
            u'the "Packages/Package Control/" folder and then follow the ' + \
            u'instructions at https://sublime.wbond.net/installation to ' + \
            u'properly upgrade Package Control.')
        return

    init_config()
    settings = sublime.load_settings('SVN.sublime-settings')
    svn_debug.set_debug(settings.get('debug', False))
    svn_debug.set_debug_log_file(settings.get('debug_log_file', None))

    def reset_shown():
        SVN.shown_missing = {}

    settings.add_on_change('svn_binary_path', reset_shown)
    settings.add_on_change('auto_update_check_frequency',
                           StatusCache.set_check_updates)
    StatusCache.set_check_updates()

    settings_dict['svn_binary_path'] = settings.get('svn_binary_path')

    SvnInit().start()

    bin_folder = os.path.join(os.path.dirname(os.path.abspath(__file__)),
                              'bin')
    has_bin = os.path.exists(bin_folder)
    svn_exe = os.path.join(bin_folder, '1.8', 'svn.exe')
    has_svn = os.path.exists(svn_exe)
    if os.name == 'nt' and (not has_bin or not has_svn):
        sublime.error_message(u'SVN\n\nThe SVN package seems to have been ' + \
            u'synced or copied from an OS X or Linux machine. The Windows ' + \
            u'version of the package is different due to the inclusion of ' + \
            u'a number of necessary exe files.\n\nTo fix the SVN package ' + \
            u'so that it may run properly, please run "Remove Package" and ' + \
            u'then reinstall it using the "Install Package" command.\n\nTo ' + \
            u'learn how to properly sync packages across different machines, ' + \
            u'please visit https://sublime.wbond.net/docs/syncing')
Esempio n. 3
0
    from .sublimesvn.status import (StatusCache)
    from .sublimesvn.proc import (SVN)
    from .sublimesvn.errors import (NotFoundError)

    from .sublimesvn import (
        debug as svn_debug,
        times as svn_times,
        paths as svn_paths,
        proc as svn_proc,
        threads as svn_threads
    )

settings = sublime.load_settings('SVN.sublime-settings')
svn_debug.set_debug(settings.get('debug', False))
svn_debug.set_debug_log_file(settings.get('debug_log_file', None))


def reset_shown():
    SVN.shown_missing = {}

settings.add_on_change('svn_binary_path', reset_shown)
settings.add_on_change('auto_update_check_frequency', StatusCache.set_check_updates)
StatusCache.set_check_updates()

hook_match = re.search("<class '(\w+).ExcepthookChain'>", str(sys.excepthook))

if not hook_match:
    class ExcepthookChain(object):
        callbacks = []
        names = {}
Esempio n. 4
0
        from .sublimesvn.errors import (NotFoundError)

        from .sublimesvn import (debug as svn_debug, times as svn_times, paths
                                 as svn_paths, proc as svn_proc, threads as
                                 svn_threads)
    except (ImportError) as e:
        if str(e).find('bad magic number') != -1:
            need_package_control_upgrade = True
        else:
            raise

try:
    # This will error if the import fails
    settings = sublime.load_settings('SVN.sublime-settings')
    svn_debug.set_debug(settings.get('debug', False))
    svn_debug.set_debug_log_file(settings.get('debug_log_file', None))

    def reset_shown():
        SVN.shown_missing = {}

    settings.add_on_change('svn_binary_path', reset_shown)
    settings.add_on_change('auto_update_check_frequency',
                           StatusCache.set_check_updates)
    StatusCache.set_check_updates()
except (NameError):
    pass

hook_match = re.search("<class '(\w+).ExcepthookChain'>", str(sys.excepthook))

if not hook_match: