From b7eefff78678138b39e07c6e2898c95314b7fd1c Mon Sep 17 00:00:00 2001 From: Michael Hall Date: Mon, 23 Nov 2015 20:30:33 -0500 Subject: [PATCH] Make sure all svn threads use the path --- svn_commands.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/svn_commands.py b/svn_commands.py index aed28d0..604566b 100644 --- a/svn_commands.py +++ b/svn_commands.py @@ -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""" @@ -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""" @@ -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"""