Skip to content

Commit

Permalink
Make sure all svn threads use the path
Browse files Browse the repository at this point in the history
  • Loading branch information
m-hall committed Nov 24, 2015
1 parent 962b5d9 commit b7eefff
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions svn_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,17 @@ def nothing(self, nothing1=None, nothing2=None, nothing3=None, **args):
"""Does nothing, just a placeholder for things I don't handle"""
return

def run_command(self, cmd, files=None, log=True, async=True, on_complete=None):
"""Starts a process for a native command"""
def get_svn_command(self):
"""Gets the command to run for native SVN"""
svn_path = settings.get_native('svnPath', False)
if svn_path is False:
return thread.Process(self.svn_name, 'svn ' + cmd, files, log, async, on_complete)
if svn_path == false:
return 'svn '
else:
return thread.Process(self.svn_name, svn_path + ' ' + cmd, files, log, async, on_complete)
return svn_path + ' '

def run_command(self, cmd, files=None, log=True, async=True, on_complete=None):
"""Starts a process for a native command"""
return thread.Process(self.svn_name, self.get_svn_path() + cmd, files, log, async, on_complete)

def run_tortoise(self, cmd, files):
"""Starts a process for a TortoiseSVN command"""
Expand Down Expand Up @@ -150,7 +154,7 @@ def on_changes_available(self, process):

def select_changes(self):
"""Gets the committable changes"""
thread.Process('Log', 'svn status', self.files, False, True, self.on_changes_available)
thread.Process('Log', self.get_svn_path() + 'status', self.files, False, True, self.on_changes_available)

def get_url(self, file):
"""Gets the svn url for a file"""
Expand Down Expand Up @@ -299,7 +303,7 @@ def on_logs_available(self, process):

def get_revisions(self, revisions):
"""Runs a process to get log output"""
thread.Process('Log', 'svn log -r HEAD:1 -l ' + str(revisions), self.files, False, True, self.on_logs_available)
thread.Process('Log', self.get_svn_path() + 'log -r HEAD:1 -l ' + str(revisions), self.files, False, True, self.on_logs_available)

def run(self, paths=None, group=-1, index=-1):
"""Runs the command"""
Expand Down

0 comments on commit b7eefff

Please sign in to comment.