Permalink
Browse files

Remove bytecode specific imports

  • Loading branch information...
miped committed Feb 2, 2016
1 parent 1fd97fb commit 49003fa47c0f76b0b474d275d096be1246980322
Showing with 12 additions and 29 deletions.
  1. +1 −1 README.md
  2. +11 −28 SublimeGit.py
View
@@ -6,7 +6,7 @@ SublimeGit is going open source. This is a short TODO list of what needs to happ
- [x] Remove licensing code and commands
- [x] Release plugin code in SublimeGit repo
- [x] Add license
- [ ] Remove code for dealing with bytecode distribution
- [x] Remove code for dealing with bytecode distribution
- [ ] Change SublimeGit repo in Package Control to install from Github
- [ ] Move documentation to readthedocs, or a github pages site or something
- [ ] Redirect SublimeGit domains to this repository
View
@@ -44,12 +44,11 @@
needs_reload = [n for n, m in list(sys.modules.items()) if n[0:4] == 'sgit' and m is not None]
reloaded = []
for prefix in ('sgit', 'sgit2', 'sgit3'):
for postfix in LOAD_ORDER:
module = prefix + postfix
if module in needs_reload:
reloaded.append(module)
reload(sys.modules[module])
for postfix in LOAD_ORDER:
module = 'sgit' + postfix
if module in needs_reload:
reloaded.append(module)
reload(sys.modules[module])
if reloaded:
logger.info('Reloaded %s' % ", ".join(reloaded))
@@ -62,17 +61,9 @@
lvl = getattr(logging, settings.get('log_level', '').upper(), logging.WARNING)
logger.setLevel(lvl)
try:
from sgit2 import * # noqa
from sgit2.git_extensions.legit import * # noqa
from sgit2.git_extensions.git_flow import * # noqa
except ImportError as e:
try:
from sgit import * # noqa
from sgit.git_extensions.legit import * # noqa
from sgit.git_extensions.git_flow import * # noqa
except ImportError:
raise
from sgit import * # noqa
from sgit.git_extensions.legit import * # noqa
from sgit.git_extensions.git_flow import * # noqa
# Enable plugins
git_extensions.legit.enabled = settings.get('git_extensions', {}).get('legit', True)
@@ -81,17 +72,9 @@
def unload_handler():
logging.shutdown()
else:
try:
from .sgit3 import * # noqa
from .sgit3.git_extensions.legit import * # noqa
from .sgit3.git_extensions.git_flow import * # noqa
except ImportError as e:
try:
from .sgit import * # noqa
from .sgit.git_extensions.legit import * # noqa
from .sgit.git_extensions.git_flow import * # noqa
except ImportError:
raise
from .sgit import * # noqa
from .sgit.git_extensions.legit import * # noqa
from .sgit.git_extensions.git_flow import * # noqa
def plugin_loaded():
settings = sublime.load_settings('SublimeGit.sublime-settings')

0 comments on commit 49003fa

Please sign in to comment.