Skip to content

Commit

Permalink
Merge pull request #20 from lite3/master
Browse files Browse the repository at this point in the history
Fixed: No document editing does not work.
  • Loading branch information
litefeel committed Nov 25, 2013
2 parents b51e6e5 + 71006c2 commit 2e6d8e6
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 11 deletions.
26 changes: 16 additions & 10 deletions TortoiseSVN.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand All @@ -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):
Expand Down Expand Up @@ -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
3 changes: 2 additions & 1 deletion messages.json
Original file line number Diff line number Diff line change
@@ -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"
}
4 changes: 4 additions & 0 deletions messages/1.3.1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Sublime-TortoiseSVN 1.3.1 changelog
=============================

- Fixed: No document editing does not work.

0 comments on commit 2e6d8e6

Please sign in to comment.