diff --git a/TortoiseSVN.py b/TortoiseSVN.py index b36d1d6..b8540ac 100644 --- a/TortoiseSVN.py +++ b/TortoiseSVN.py @@ -6,12 +6,11 @@ class TortoiseSvnCommand(sublime_plugin.WindowCommand): def run(self, cmd, paths=None, isHung=False): - if paths: - dir = '*'.join(paths) - else: - dir = sublime.active_window().active_view().file_name() - + dir = self.getPath(paths) + if not dir: + return + settings = sublime.load_settings('TortoiseSVN.sublime-settings') tortoiseproc_path = settings.get('tortoiseproc_path') @@ -29,6 +28,16 @@ def run(self, cmd, paths=None, isHung=False): if isHung: proce.communicate() + def getPath(self, paths): + path = None + if paths: + path = '*'.join(paths) + else: + view = sublime.active_window().active_view() + path = view.file_name() if view else None + + return path + class MutatingTortoiseSvnCommand(TortoiseSvnCommand): def run(self, cmd, paths=None): @@ -77,8 +86,5 @@ def run(self, paths=None): TortoiseSvnCommand.run(self, 'blame', paths) def is_visible(self, paths=None): - if paths: - file = '*'.join(paths) - else: - file = self.activeView().file_name() - return os.path.isfile(file) + file = self.getPath(paths) + return os.path.isfile(file) if file else False diff --git a/messages.json b/messages.json index 5e854f3..2c34aab 100644 --- a/messages.json +++ b/messages.json @@ -1,5 +1,6 @@ { "install": "messages/install.txt", "1.2.0": "messages/1.2.0.txt", - "1.3.0": "messages/1.3.0.txt" + "1.3.0": "messages/1.3.0.txt", + "1.3.1": "messages/1.3.1.txt" } diff --git a/messages/1.3.1.txt b/messages/1.3.1.txt new file mode 100644 index 0000000..b0b14bf --- /dev/null +++ b/messages/1.3.1.txt @@ -0,0 +1,4 @@ +Sublime-TortoiseSVN 1.3.1 changelog +============================= + +- Fixed: No document editing does not work.