Skip to content

Commit

Permalink
Merge pull request #17 from lite3/master
Browse files Browse the repository at this point in the history
fixed argments error.
  • Loading branch information
litefeel committed Nov 5, 2013
2 parents 7fc5f47 + 5de4c32 commit 8d78b4e
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions TortoiseSVN.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
import subprocess

class TortoiseSvnCommand(sublime_plugin.WindowCommand):
def run(self, cmd, view, paths=None):
def run(self, cmd, paths=None):
if paths:
dir = '*'.join(paths)
else:
dir = view.file_name()
dir = sublime.active_window().active_view().file_name()


settings = sublime.load_settings('TortoiseSVN.sublime-settings')
Expand All @@ -30,14 +30,13 @@ def run(self, cmd, view, paths=None):


class MutatingTortoiseSvnCommand(TortoiseSvnCommand):
def run(self, cmd, paths=None, isRevertView=False):
self.view = sublime.active_window().active_view()
TortoiseSvnCommand.run(self, cmd, self.view, paths)
def run(self, cmd, paths=None):
TortoiseSvnCommand.run(self, cmd, paths)

if isRevertView :
(row,col) = self.view.rowcol(self.view.sel()[0].begin())
self.lastLine = str(row + 1);
sublime.set_timeout(self.revert, 100)
self.view = sublime.active_window().active_view()
(row,col) = self.view.rowcol(self.view.sel()[0].begin())
self.lastLine = str(row + 1);
sublime.set_timeout(self.revert, 100)

def revert(self):
self.view.run_command('revert')
Expand All @@ -49,7 +48,7 @@ def revertPoint(self):

class SvnUpdateCommand(MutatingTortoiseSvnCommand):
def run(self, paths=None):
MutatingTortoiseSvnCommand.run(self, 'update', paths, True)
MutatingTortoiseSvnCommand.run(self, 'update', paths)


class SvnCommitCommand(TortoiseSvnCommand):
Expand All @@ -59,7 +58,7 @@ def run(self, paths=None):

class SvnRevertCommand(MutatingTortoiseSvnCommand):
def run(self, paths=None):
MutatingTortoiseSvnCommand.run(self, 'revert', paths, True)
MutatingTortoiseSvnCommand.run(self, 'revert', paths)


class SvnLogCommand(TortoiseSvnCommand):
Expand Down

0 comments on commit 8d78b4e

Please sign in to comment.